
*******************************************************************************
*  RELEASE 1.10 through 1.30 BUGLIST                                          *
*                                                                             *
*  This file contains a list of bugs found in versions 1.10, 1.20 & 1.30      *
*  of the C30 tools.                                                          *
*  All bugs are fixed in the 2.00 .                                           *
*******************************************************************************

PARSER
-----------------------------------------------------------------------------
1) An initialization of the form "int x = (int)&var", which is legal, is 
   flagged as illegal by the compiler.  Fixed in 1.21.01.

2)    2704  fixed 1.3 
   The compiler does not detect a reference to a member of an undefined
   structure.  In some cases the compiler can crash.

3) dsp2752 fixed in 2.0 
   The parser folds enumeration constants incorrectly and generates
   inappropriate warning messages.

CODE GENERATOR
-----------------------------------------------------------------------------
1) An expression containing a right shift, that is implicitly or explicitly
   converted to a different type, gets generated as a left shift instead.
   Example:    long = int >> 24;

2) PTR 2269.  Indirect structure assignments to a nested structure generate
   incorrect code.

3) PTR 2268.  Functions that have register variables do not set the status 
   correctly for the return value.  In the next version, functions no longer
   set the status on their return values.

4) A function that is declared to return a structure but falls through without
   returning one incorrectly tries to return some (garbage) value to the caller.

5) Comparison of two floating point constants is folded to a floating point
   value rather than an integer value.

6) An unconditional branch within three instructions of the "LDI SP,FP" in
   the function prolog gets moved up (delayed) 4, rather than 3, instructions.
   This usually occurs when there are one or two register variables, and the
   very first statement in the function is a "switch".   

7) A structure assignment having a quest operator as the RHS causes the 
   codegen to crash.  Example: struct1 = i ? struct2 : struct3;
   This is actually incorrect syntax and the parser now catches it.

8) In the big model (-b), using the address of a variable generates an 
   incorrect LDP instruction.

9) Code generated for the big model (-b) on the PC is incorrect.  All the LDP
   instructions are generated with large invalid offsets.

10) Generates RTS instead of RTI for returning from an interrupt function.

11) c30 2736 fixed in 2.0
    In very rare cases where a unary operation (-, ~, or cast) is a 
    sub-expression of an arithmetic runtime support call, the compiler
    fails to correctly place the operands in R0 and R1.  This usually occurs
    when values are being tracked in R0 from previous computations; if this
    occurs the bug can be avoided by labelling the offending statement.

12) c302745 fixed in 2.0
    In functions that return structures, the code to return the structure is
    not generated.  Workaround is to avoid functions that return structures
    and use pointers instead.

13) c302748 fixed in 2.0
    In interupt subroutines that make function calls the codegen is
    not saving and restoring the environment as described in the UG 
    5-21 - 5-22.  It also returning with a RETS instead of an RETI.
    generate the context save.

14) c302766 fixed in 2.0
    In a block which contains an initialization of a static variable, followed
    by a switch statement, the compiler can omit the .text directive 
    following the initialization.

14) c302795 fixed in 2.0
    In the big model, the compiler does not load the DP before a direct access
    to a global structure or array.

ASSEMBLER
-----------------------------------------------------------------------------
1) Generates wrong opcode for IACK.                                  

2) 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. 

3) PTR 2351 .usect directive incorrectly accepts a non-absolute value for the
   size field. 

4) PTR 2357 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. 

5) C302706.  Fixed v1.30   
   The assembler does not allow direct addressing mode operands with absolute or
   relocatable values wider than 16 bits.  

6) C302703.   PC Only
   The .space directive cannot handle a size operand of 08000h or higher.

7) C302753 fixed 2.0 
   The wrong opcode is generated for a 2 operand instruction using 
   3 operands when the addressing mode of the first operand is
   indirect with pre-displacement add
       i.e.  ADDI  *+ar4(0),r4,r5

8) dsp 2759 fixed in 2.0  
   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

9) c30 2760 fixed in 2.0  
   Global variables defined in a .asect section are being relocated at
   link time.

RUN TIME SUPPORT
------------------------------------------------------------------------
1)    2733 FIXED v1.30   
   Memory calculation in realloc does not get the size of the merged
   buffers correct.

ROM UTILITY
-----------------------------------------------------------------------------
1) PTR 2160.  ROM utility generated lowercase hex characters.

2) Rom utility only generated the lower 16 bits of each word. 

LINKER 
-----------------------------------------------------------------------------

1)     2766 fixed in v3.3
   Sections with a length of 0 are always being allocated at 0 in the link
   map.  

ARCHIVER   
-----------------------------------------------------------------------------

1) C30 (internal) fixed in 2.0
   The v1.30 archiver does not correctly handle odd-length files.  

2) C30 (internal) fixed   V2.0
   The archiver incorrectly detects string problems with the string table
   ("string table missing") on some byte-swapped object files.

DOCUMENTATION
-----------------------------------------------------------------------------

1) c30 2764 fixed in 2.0
   On 3-3 of C Compiler User's Guide _c30c is not the correct predefined 
   variable.  It is actually _320C30.
