*******************************************************************************
*  RELEASE 5.05 BUGLIST                                                       *
*                                                                             *
*  This file contains a list of bugs in the 5.05 Release of the DSP tools.    *
*  All bugs are fixed in v5.10, unless otherwise indicated.                   * 
*                                                                             *
*******************************************************************************

ALL TOOLS    
-----------------------------------------------------------------------------
1) PTR 2332.  (PC only) The file C.CMD was accidentally left off the release
   disks.


PRE-PROCESSOR
-----------------------------------------------------------------------------

PARSER 
-----------------------------------------------------------------------------
1)  Sizeof("string constant") generated the size of the pointer, rather than
    the size of the string.

2)  PTR 2399.  Constant folding is performed with 32-bit arithmetic, sometimes 
    resulting in incorrect values.  For example, the expression ~0x8000 results
    in the 32-bit value 0xFFFF7FFF, which is interpreted as -32769 in the code 
    generator and results in assembly errors.  Fixed in 5.07.01.

3)  The parser generates incorrect line number information for functions that 
    have no type specifier in their declaration.  This results in incorrect
    .line directives when using the -o code generator option.  Example:
	  main() {}        /* BAD .line DIRECTIVE */
          int main() {}    /* WORKS */

4) An initialization of the form "int x = (int)&var", which is legal, is 
   flagged as illegal by the compiler.

5) gsp2704 will fix 5.10
   The compiler does not detect a reference to a member of an undefined
   structure.  In some cases the compiler can crash.


6) dsp2752 will fix 5.10
   The parser folds enumeration constants incorrectly and generates
   inappropriate warning messages.


CODE GENERATOR
-----------------------------------------------------------------------------
1) PTR 2329.  Use of local floats or floats in local (auto) structures in
   expressions is not always handled correctly, causing subsequent accesses 
   of local variables to be incorrectly read from memory.  Fixed in 5.06.

2) Comparisons for equality (==) or inequality (!=) with unsigned operands
   generate signed comparisons rather than unsigned.  Fixed in 5.06.

3) Use of floating point values in quests (a ? float : float) will cause
   the stack to be "cleaned up" (decremented) and the stack pointer becomes
   corrupted.  Fixed in 5.06.

4) The use of the assignment of a float constant in an expression generates
   error message and incorrect code.  Fixed in 5.06.

5) When calculating the address of an array that is either local or part of
   a structure, the compiler does not add in the offset of the array on the
   local frame or in the structure.  Fixed in 5.06.

6) PTR 2367.  Op-assignments with a register indirect on the LHS will not 
   generate correct code.  The offset of the LHS is added to the register 
   twice.  Fixed 5.07.  Getaround is to expand the opasg to read:
           	 *a += x         ==>      *a = *a + x;
   Fixed in 5.07.

7) The use of user labels occasionally causes errors in status tracking,
   thereby possibly causing missing LARPs and SEXTs.  Get-around is to avoid 
   user labels.  Fixed in 5.07.

8) Statements of the form a.b.c.d.e[f] (adjacent dots or structure references
   forming an array reference) are improperly handled (wrong address used).
   Fixed in 5.07.

9) Large structure moves occasionally use RPTK with counts of greater than 255.
   Fixed in 5.07.

10) Very large structure offsets used in -> operations may cause program crash
    on VMS or the message "Translation error..." on other systems.  
    Fixed in 5.07.

11) Taking the address of a structure member does not always work. 
    Fixed in 5.07.

12) When the result of pointer subtraction is used as a sub-expression in an
    arithmetic operation, the compiler generates incorrect code and the message
    "Unable to push BADNODE, line ___". Fixed in 5.08.
  
13) When the pre-increment (or decrement) operation is applied to a pointer,
    and then used in a comparison, the sign-extension mode is incorrect.
    Fixed in 5.08.

14) When the result of a bitwise AND operation is compared to a constant, the
    constant is not properly sign-extended.  Example:  
       if ((x & 0x8000) == 0x8000) ...
    Fixed in 5.08.

15) A switch statement as the first statement in a loop may have not set
    the ARP correctly on entry to the loop.  This occurs especially if the
    variable used as the switch expression is used near the end of the loop.
    Fixed in 5.08.

16) The code generator generates incorrect code for a expression that calls 
    a floating-point function, then assigns the result, then uses the result
    of the assignmemt in a comparison.  Example:
	if ((x = sin(y)) < 0.5) ... 
    This construct causes stack corruption, probably crashing the program. 
    Fixed in 5.08.

17) Bitfields were not pushed onto the stack properly (ARP not set to 1).
    Fixed in 5.07.

18) (PC only). Switch statements with negative case values can cause the 
    compiler to generate illegal output that cannot be assembled.  Fixed in 
    5.08.

19) dsp2723  fix 5.10   
    Erroneus address calculation of local arrays of structures using a
    local variable as an index.

    
20) dsp2724  fix 5.10 
    variable shift count calculated by an expression with a signed
    type variable is not setting the correct sign extension status.
    

21) dsp2725  fix 5.10
    Problem with returning bit fields from functions.


22) dsp2737 & dsp2730 fix 5.10
    Using the address of an element of a local array in an address
    calculation fails. 
    i.e. char buffer, *bufp; int a; a = (buffer+10)-bufp;
         OR                         a = &(buffer[10]) - bufp;
    The offset (10) is added in twice.


23) dsp2738 fix 5.10
    While loop with a floating point assignment in the logical expression
    (i.e. while ((temp = 10.0*pow10) <= value) ) corrupts the software
    stack.


24) dsp2746 fix 5.10
    In rare instances of a switch statement where cases are allowed to
    fall through into the next case, the ARP is not being updated
    correctly. 


25) dsp2751 fix 5.10
    In instances where a pointer is used to access array elements and
    the pointer is used in a logical expression of a flow control 
    statement along with the array name: 
	      unsigned int buf[4], i;  i = buf;
	      if (i < buf + 4)     /* logical expression */
    The codegen generates the wrong branch instruction. 


26) dsp2761 fix 5.20
    When a function parameter is a register pointer and that pointer is
    passed to another function the stack is corrupted.
	     void rtn1(p)
	     register int* p;
	     {  rtn0(p, 1);  }


FLOATING POINT LIBRARY
-----------------------------------------------------------------------------
1) In the F_ITOF function, the overflow bit is never cleared before it
   is checked, causing some positive numbers to be treated as negative.

2) A problem with the F_ADD function has been fixed.  The problem shows up
   when subtracting a number less than a given power of two from one that
   is greater, for example 70.0 - 60.0.  (Fixed in v5.07). 

RUNTIME SUPPORT
-----------------------------------------------------------------------------
1) PTR 2384, 2385, 2386.  The I$$REST function (extract SAVEREST.ASM from 
   RTS.LIB), pops one too many words from the frame.  To fix it, extract 
   SAVEREST.ASM from RTS.LIB and delete the last "MAR *-" from I$$REST.

2) The functions log(), log10(), and pow() do not work because of a code
   generator bug (#16).  These functions can corrupt the stack and crash
   your program if they are called.

3) GSP2733 will fix 5.10
   Memory Calculation in realloc does not get the size of the merged buffers
   correct.

ASSEMBLER
-----------------------------------------------------------------------------
1) The assembler crashes when an archived macro that uses an illegal end macro
   statement is called more than once.  Workaround is to make sure all macros
   are concluded with a $ENDM statement.

2) PTR 2351. The .usect directive incorrectly accepts non-absolute values for
   the size field. 

3) PTR 2357. The assembler does not assemble lines that appear after a line 
   that is greater than 200 characters or a file in which the last line is not
   ended with a newline \n.

4) The assembler will crash given  .space  0FFFFh .

5) gsp 2734  
   Using the -i option the assembler performs a random seclection of
   other options.  This bug was typically appearing when make was being
   used.


6) dsp 2757 will fix 5.20
   Using subk, addk, lark with a forward reference to a data memory address
          subk  x       will cause the assembler to substitute a long
      x:  nop           immediate instruction (splk, adlk, lrlk) even if 
			the value of x is smaller than 8 bits.

7) dsp 2759 will fix 5.20
   Using a relocatable address in an expression calculation using multiply
   and divide is not causing an error message.
      x:  nop
	  ldpk  x/80H    ; Assembler should flag as an error


8) c30 2760 will fix 5.20
   Global variables defined in a .asect section are being relocated at
   link time.



LINKER
-----------------------------------------------------------------------------
1) (VMS Only) Creates the output file even if symbol referencing errors
   occur.  Fixed in v5.10.

ARCHIVER
-----------------------------------------------------------------------------
ROM UTILITY
-----------------------------------------------------------------------------
1) Crashes when the -w (Intel Word) option is used.

SOURCE CONVERSION UTILITY
-----------------------------------------------------------------------------
1) PTR 2320, 2321.  Does not insert semicolon before comments.  Workaround 
   is to use -s option on dspcv or -b on dspa.  (Be sure -s occurs before 
   filename, as in "dspcv -s file", not "dspcv file -s".

