C6000 C/C++ CODE GENERATION TOOLS 7.3.17 May 2014 Defect History ------------------------------------------------------------------------------- Table of Contents ------------------------------------------------------------------------------- 1. Defects fixed in C6000 Code Generation Tools release 7.3.17 2. Defects fixed in C6000 Code Generation Tools release 7.3.16 3. Defects fixed in C6000 Code Generation Tools release 7.3.15 4. Defects fixed in C6000 Code Generation Tools release 7.3.14 5. Defects fixed in C6000 Code Generation Tools release 7.3.13 6. Defects fixed in C6000 Code Generation Tools release 7.3.12 7. Defects fixed in C6000 Code Generation Tools release 7.3.11 8. Defects fixed in C6000 Code Generation Tools release 7.3.10 9. Defects fixed in C6000 Code Generation Tools release 7.3.9 10. Defects fixed in C6000 Code Generation Tools release 7.3.8 11. Defects fixed in C6000 Code Generation Tools release 7.3.7 12. Defects fixed in C6000 Code Generation Tools release 7.3.6 13. Defects fixed in C6000 Code Generation Tools release 7.3.5 14. Defects fixed in C6000 Code Generation Tools release 7.3.4 15. Defects fixed in C6000 Code Generation Tools release 7.3.3 16. Defects fixed in C6000 Code Generation Tools release 7.3.2 17. Defects fixed in C6000 Code Generation Tools release 7.3.1 18. Defects fixed in C6000 Code Generation Tools release 7.3.0 19. Defects fixed in C6000 Code Generation Tools release 7.3.0B3 20. Defects fixed in C6000 Code Generation Tools release 7.3.0B1 21. Current Known Issues =============================================================================== 1. Defects fixed in C6000 Code Generation Tools release 7.3.17 =============================================================================== The following 4 defects were fixed in C6000 Code Generation Tools release 7.3.17, released May 2014. ------------------------------------------------------------------------------- FIXED SDSCM00041127 ------------------------------------------------------------------------------- Summary : Missing snprintf() export when using stdio.h in C++ files Fixed in : 7.3.17 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Release Notes: The MSP430's stdio.h file does not export std::snprintf() when stdio.h is used in a C++ file like it does for other C standard functions. ------------------------------------------------------------------------------- FIXED SDSCM00049421 ------------------------------------------------------------------------------- Summary : Auto-generated stress test terminate abnormally in optimizer Fixed in : 7.3.17 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Release Notes: This test is a very large sequence of recurrent assignments. The compiler combines all of them into one very large statement, and crashes or aborts depending on the release and platform. The reported crash with release 5.1.0 is a stack overflow that happens only on Windows. It is probably due to an inefficiency in the Windows C++ compiler that was used to build the release, but we can't reproduce the problem when we use our current Windows compiler. (5.1.0 was built in 2004.) The aborts seen in releases 6.1.x through 7.x are due to an overly conservative sanity check, triggered by the very large statement. ------------------------------------------------------------------------------- FIXED SDSCM00049832 ------------------------------------------------------------------------------- Summary : Using optimization causes incorrect result Fixed in : 7.3.17 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Release Notes: The attached test case builds and runs correctly when built without optimization. When built with --opt_level=2 or higher, incorrect results are printed out. The cause of this bug is a wrong constant assignment coalesce in a loop body. The coalesce of these two assignment neglect the data dependency between them. Sometimes it could cause wrong result. ------------------------------------------------------------------------------- FIXED SDSCM00050023 ------------------------------------------------------------------------------- Summary : SIGSEGV when using pragma on a template function Fixed in : 7.3.17 Severity : S2 - Major Affected Component : Parser Release Notes: The compiler may emit an internal error (SIGSEGV) when the user attempts to apply a pragma to a template class function. =============================================================================== 2. Defects fixed in C6000 Code Generation Tools release 7.3.16 =============================================================================== The following 9 defects were fixed in C6000 Code Generation Tools release 7.3.16, released March 2014. ------------------------------------------------------------------------------- FIXED SDSCM00045417 ------------------------------------------------------------------------------- Summary : bool and _Bool are not defined correctly in strict ANSI C mode Fixed in : 7.3.16 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Duplicate Defects : SDSCM00048227, SDSCM00048226 Release Notes: The size and type of "bool" and "_Bool" must be the same in all modes so that declarations of the same object in different modules are compatible. However, in strict ANSI C89 mode, stdbool.h defines _Bool as "unsigned int," which means a C++ module using bool and a C module including stdbool.h and using bool are using incompatible types. _Bool and stdbool.h are C99 features, so a strictly-conforming C89 program does not use them, but the TI compiler provides them as an extension. This would cause a problem when attempting to mix C++ files and C files which both declare The ARM EABI Procedure Call Standard for the ARM Architecture (ARM IHI 0042D) section 7.1.1 ("Arithmetic Types") requires that both C++ bool and C99 _Bool be unsigned byte types. However, the TI toolset does not conform to that requirement. ------------------------------------------------------------------------------- FIXED SDSCM00048498 ------------------------------------------------------------------------------- Summary : MISRA-C rule 12.8 incorrectly reported for an expression like ((uint32_t)2U << 8U); Fixed in : 7.3.16 Severity : S2 - Major Affected Component : Parser Release Notes: A violation warning for the MISRA 12.8 rule was reported for the expression: ((uint32_t)2U << 8U); The MISRA 12.8 rule states that "The right-hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left-hand operand". The underlying type is determined by section 6.10 of the MISRA Guidelines. For a literal it is defined as being the smallest type of the same sign that can represent the literal, so for 2U the type is unsigned char. In that case the diagnostic is correct. However, the cast to uint32_t should make the underlying type unsigned int, making the operation legal. ------------------------------------------------------------------------------- FIXED SDSCM00049229 ------------------------------------------------------------------------------- Summary : Symbols are missing in .debug_pubnames part of the Dwarf information Fixed in : 7.3.16 Severity : S1 - Critical / PS Affected Component : C/C++ Compiler (cl) Release Notes: This bug happens all the time. It causes the missing of .debug_pubnames section. If the users rely on the .debug_pubnames to search the global variable or function's debug information entry, he will see this bug and will have no .debug_pubnames sections. This bug should only affect debug capability. Not the execution results. ------------------------------------------------------------------------------- FIXED SDSCM00049271 ------------------------------------------------------------------------------- Summary : INTERNAL ERROR results when building code that uses features from C++ testing framework Fixed in : 7.3.16 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Release Notes: The compiler correctly handles const variables that are referenced in a program using templates. ------------------------------------------------------------------------------- FIXED SDSCM00049383 ------------------------------------------------------------------------------- Summary : dinkumware test t257 failed during release validation Fixed in : 7.3.16 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Release Notes: On the C6000 7.3.x branch only, the assembler would incorrectly mark XXXXXXX object files as allowing the style of templates which clobber A15 because the compiler failed to emit a definition of build attribute Tramps_Use_SOC. A15 is a SOE ("callee-saved") register, so the value must be preserved by the callee. However, if a call site were turned into a trampoline call, the value in A15 would be clobbered. This is possible on non-Tesla C6000 targets because, but much less likely because SOC trampolines clobber B31, which is a SOC "caller-saved" register. ------------------------------------------------------------------------------- FIXED SDSCM00049407 ------------------------------------------------------------------------------- Summary : FAILURE in optimizer on local static variables with --opt_level=4 Fixed in : 7.3.16 Severity : S2 - Major Affected Component : Optimizer Duplicate Defects : SDSCM00049409 Release Notes: In rare cases, the optimizer may emit a spurious diagnostic message which says "FAILURE in mark_use_of_function_local_static." This message includes some symbol names, the first of which will be partially garbled. This message does not affect the generated code, so it may be ignored. ------------------------------------------------------------------------------- FIXED SDSCM00049509 ------------------------------------------------------------------------------- Summary : SET_DATA_SECTION does not work if issued from within a _Pragma operator Fixed in : 7.3.16 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Release Notes: The test case attached has these lines ... #define PRAGMA(x) _Pragma(#x) PRAGMA(SET_DATA_SECTION("dsname")) This code compiles fine with several other TI compilers. However, for the C6000 compiler, this results in ... "file.c", line 5: error: this pragma cannot be used in a _Pragma operator (a #pragma directive must be used) "file.c", line 5: error: expected a "(" "file.c", line 5: error: expected a ")" ------------------------------------------------------------------------------- FIXED SDSCM00049539 ------------------------------------------------------------------------------- Summary : Vector code with variables of same name (as thru inlining) may produce wrong answers Fixed in : 7.3.16 Severity : S2 - Major Affected Component : Optimizer Release Notes: A loop that can be vectorised, when it contains expressions with different variables of same name (as thru inlining the same callee at more than one site) may produce wrong answers. The test case here uses vectors of type complex and uses inlined functions for some calls within the loop. ------------------------------------------------------------------------------- FIXED SDSCM00049603 ------------------------------------------------------------------------------- Summary : C Initialization records are created for NOLOAD sections Fixed in : 7.3.16 Severity : S3 - Minor Affected Component : ELF Linker Release Notes: A NOLOAD output section is not allocated in the executable file created by the linker. If RAM model is used as the initialization method, the section will not be initialized by the loader since it is not allocated in memory. If ROM model is used it will be initialized because the linker creates initialization records in the .cinit section even if the section is marked NOLOAD This is a bug. =============================================================================== 3. Defects fixed in C6000 Code Generation Tools release 7.3.15 =============================================================================== The following 10 defects were fixed in C6000 Code Generation Tools release 7.3.15, released January 2014. ------------------------------------------------------------------------------- FIXED SDSCM00046180 ------------------------------------------------------------------------------- Summary : MISRA check 14.1 should not treat while(0) as potential infinte loop Fixed in : 7.3.15 Severity : S3 - Minor Affected Component : Parser Release Notes: Misra rule 14.1 no longer emits a false warning for do{} while(0). ------------------------------------------------------------------------------- FIXED SDSCM00046242 ------------------------------------------------------------------------------- Summary : --gen_pic without --abi=eabi generates illegal builtin operator Fixed in : 7.3.15 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Release Notes: --gen_pic is only supported for --abi=eabi ------------------------------------------------------------------------------- FIXED SDSCM00047666 ------------------------------------------------------------------------------- Summary : Definition of SIZE_MAX is wrong Fixed in : 7.3.15 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Release Notes: The definition of SIZE_MAX was incorrectly specified as the largest signed integer value. It is now defined as the largest unsigned integer value. ------------------------------------------------------------------------------- FIXED SDSCM00048289 ------------------------------------------------------------------------------- Summary : Errors of the linker due to the difference in version of CGT Fixed in : 7.3.15 Severity : S2 - Major Affected Component : Linker Duplicate Defects : SDSCM00048621 Release Notes: The fix for SDSCM00044393 was intended to allow the following linker command file syntax: SECTIONS { OUTSECT_NAME MEMORY_RANGE_NAME } The Assembly Language Tools User Guide erroneously stated that this syntax was accepted. However, allowing the above syntax introduces ambiguity in the linker command file grammar, which caused previously accepted command files to produce errors, resulting in this bug (SDSCM00048289). This change removes the fix applied for SDSCM00044393. The above syntax will no longer be accepted. The linker will now issue a warning if an output section is specified but no placement information is found for it. The documentation will be updated to specify that load allocation may be specified with the syntax "load = allocation" or "> allocation". The above syntax will result in a warning that no placement was specified for OUTSECT_NAME and a default placement will be applied. Valid linker command files that were rejected due to the ambiguity will now be accepted. ------------------------------------------------------------------------------- FIXED SDSCM00048440 ------------------------------------------------------------------------------- Summary : SIGSEGV when using MISRA checks on code with an anonymous struct Fixed in : 7.3.15 Severity : S2 - Major Affected Component : Parser Release Notes: When using MISRA checking on code that contains an anonymous struct, the parser will crash with a SIGSEGV. Note that anonymous structs are not legal in strict ANSI mode, and MISRA emits a warning if strict ANSI mode is not used. Defect occurs in C6000 Compiler versions: 7.2.0B1 - 7.2.12, 7.3.0B1 - 7.3.14, 7.4.0B1 - 7.4.6 ------------------------------------------------------------------------------- FIXED SDSCM00048712 ------------------------------------------------------------------------------- Summary : ARM assembler seg faults on certain input Fixed in : 7.3.15 Severity : S3 - Minor Affected Component : Assembler Release Notes: The problem is that the assembly instruction LDR r0,0x40004000 is not legal. The assembler believes 0x40004000 is a symbol because the user did not put a '#' in front of it. Adding the '#' produces the correct error: "Invalid addressing mode". This is still a defect because the assembler sshould not seg fault on a bad instruction. ------------------------------------------------------------------------------- FIXED SDSCM00048747 ------------------------------------------------------------------------------- Summary : Using END(sym_name) or SIZE(sym_name) on .cinit can cause link to fail Fixed in : 7.3.15 Severity : S2 - Major Affected Component : ELF Linker Release Notes: When the compression is performed, the size of the parent collection needs to be updated. ------------------------------------------------------------------------------- FIXED SDSCM00048895 ------------------------------------------------------------------------------- Summary : Sometimes a loop iterates one time too many, when built with --opt_level=2 Fixed in : 7.3.15 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Release Notes: This bug happens after a loop is software pipelined. It runs one more iteration because the check of the terminaton condition is wrong. Usually you can see that the decrement instruction and the comparison instruction are placed in the same cycle which is wrong. Defect occurs in C6000 Compiler versions: 7.3.0B1 - 7.3.14, 7.4.4 - 7.4.6, 7.5.0B1 ------------------------------------------------------------------------------- FIXED SDSCM00049035 ------------------------------------------------------------------------------- Summary : Value of "weak" global incorrectly propagated into function Fixed in : 7.3.15 Severity : S2 - Major Affected Component : Optimizer Release Notes: When using a weak symbol def with an initializer, the weak symbol could be pre-empted with a strong symbol from another compilation unit. The optimizer is not entitled to assume that weak definition is actually used, and thus cannot assume its initializer is the actual value it has at runtime. However, the optimizer mistakenly copied the value of the initializer into the function where the variable was used, which led to an error when the symbol was pre-empted by a strong symbol with a different value. Defect occurs in C6000 Compiler versions: 7.0.0B1 - 7.0.5, 7.1.0B1 - 7.1.0B3, 7.2.0B1 - 7.2.12, 7.3.0B1 - 7.3.14, 7.4.0B1 - 7.4.6 ------------------------------------------------------------------------------- FIXED SDSCM00049206 ------------------------------------------------------------------------------- Summary : #pragma CLINK does not work on initialized data Fixed in : 7.3.15 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Release Notes: The CLINK pragma now works as expected for initialized data. Defect occurs in C6000 Compiler versions: 7.2.0B1 - 7.2.12, 7.3.0B1 - 7.3.14, 7.4.0B1 - 7.4.6, 7.5.0B2 - 7.5.0B1 ------------------------------------------------------------------------------ 4. 7.3.14 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00047502 ------------------------------------------------------------------------------ Summary : linker fails with internal error if .cinit and .data are in the same GROUP Fixed in : 7.3.14 Severity : S2 - Major Affected Component : Linker Description: The internal error was caused by attempting to place .cinit in a GROUP with .data in an ELF file. This is not a recommended practice. The fix will allow .cinit and .data in a GROUP only if .data preceeds .cinit. In that case, compression of cinit records can not be performed. If .cinit is placed before .data in a GROUP, a user level error is reported. ------------------------------------------------------------------------------ FIXED SDSCM00047542 ------------------------------------------------------------------------------ Summary : Assembler silently converts relocatable symbol to absolute value when instruction requires absolute value Fixed in : 7.3.14 Severity : S2 - Major Affected Component : Assembler Description: The MMOVI32 instruction requires a floating point immediate in hex format as the second operand. When it is given a relocatable symbol instead, it converts it to an absolute value. The assembler should issue an error instead. When the final value of the symbol is known, it will not be updated since the instruction required a known immediate and the assembler treated the symbol as one. ------------------------------------------------------------------------------ FIXED SDSCM00047564 ------------------------------------------------------------------------------ Summary : Valid regpair MV and NEG instructions rejected for C66x Fixed in : 7.3.14 Severity : S3 - Minor Affected Component : Assembler Description: The assembler does not allow 40-bit MV or NEG with cross-path use, even though the hardware can actually support it. ------------------------------------------------------------------------------ FIXED SDSCM00047615 ------------------------------------------------------------------------------ Summary : std::vector::pop_back failure with -mv6600 -O3 Fixed in : 7.3.14 Severity : S2 - Major Affected Component : Optimizer Description: The right combination of a class with an STL vector element and a pop_back() call on that vector may compile incorrectly. ------------------------------------------------------------------------------ FIXED SDSCM00047792 ------------------------------------------------------------------------------ Summary : Multiple .cdecls instances sharing header files cause assembler error "struct/union/enum tag can't be global" Fixed in : 7.3.14 Severity : S2 - Major Affected Component : Assembler Description: When multiple .cdecls clauses in an assembly file include headers that share the same definitions, duplicate code will be generated causing an assembler error. The assembler error will state that structure or enumeration tags can't be "global". The Assembly Language Tools User's Guide states that multiple .cdelcs instances do not share the same C/C++ environment. Therefore, headers that share the same definitions must be included in the same .cdecls instance. ------------------------------------------------------------------------------ FIXED SDSCM00047883 ------------------------------------------------------------------------------ Summary : bsearch failure when using -pr relaxed ANSI mode or --gcc mode from C++ Fixed in : 7.3.14 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Duplicate Defects : SDSCM00047268 Description: In relaxed mode calling bsearch from C++ results in an infinite loop. ------------------------------------------------------------------------------ FIXED SDSCM00048073 ------------------------------------------------------------------------------ Summary : Linker fails with INTERNAL ERROR: lnk6x experienced an unhandled exception Fixed in : 7.3.14 Severity : S2 - Major Affected Component : Linker Description: Linker sometimes fails with "INTERNAL ERROR: lnk6x experienced an unhandled exception" ------------------------------------------------------------------------------ 5. 7.3.13 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00013456 ------------------------------------------------------------------------------ Summary : fgets in _IONBF mode does not respect size limit Fixed in : 7.3.13 Severity : S2 - Major Affected Component : Runtime Support Libraries (RTS) Description: The second argument to fgets() is the maximum number of chars to read. In _IONBF mode, fgets() reads until end-of-line, potentially overrunning the input buffer. For example #include #include #include #include main() { FILE *f = fopen("tst.txt", "r"); char buffer[100]; int counter = 0; setvbuf(f, NULL, _IONBF, 0); while (fgets(buffer, 5, f) != NULL) { printf("[%s]\n", buffer); switch (counter++) { case 0 assert(!strcmp(buffer, "aaaa")); break; case 1 assert(!strcmp(buffer, "bbbb")); break; case 2 assert(!strcmp(buffer, "cccc")); break; } } assert(feof(f)); puts("PASS"); } With tst.txt having (with no trailing newline) aaaabbbbcccc ------------------------------------------------------------------------------ FIXED SDSCM00042344 ------------------------------------------------------------------------------ Summary : Compiler generates internal error illegal initialization or segmentation fault Fixed in : 7.3.13 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Compiler sometimes generates internal error illegal initialization or segmentation fault when using gcc extension nested designed initializers. Workaround: The seg fault can be worked around if the nested designated initializer is removed static struct cfg config[] = { // the first definition makes the segmentation fault. Comment it and everything is fine. { .module_id = MODULE_1, .param_length = sizeof(struct module_1_params), .param = (struct module_1_params []){{1}} /* remove this designated initializer */ }, { .module_id = MODULE_2, .param_length = 5, .param = (int[]){0,1,2,3,4} }, { .module_id = MODULE_3, .param_length = 2, .param = (int[]){0,1} } }; ------------------------------------------------------------------------------ FIXED SDSCM00045147 ------------------------------------------------------------------------------ Summary : Automatic RTS library build fails for C6713 (coff, LE). Fixed in : 7.3.13 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: An automatic RTS build for a C6700 library no longer results in a scheduling error. ------------------------------------------------------------------------------ FIXED SDSCM00047263 ------------------------------------------------------------------------------ Summary : different binaries after compilation Fixed in : 7.3.13 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: When address-space layout randomisation is used by the OS, as is usually the case for modern Windows and Linux versions, compiler output may be different once in a while on the same input. It isn't predictable; in the given test case, usually only a handful of iterations are needed before a difference appears, but sometimes it takes a couple dozen. ------------------------------------------------------------------------------ FIXED SDSCM00047295 ------------------------------------------------------------------------------ Summary : Missed alias between struct fields Fixed in : 7.3.13 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: A complicated struct field reference, like a->b[c->d].e, when updated more than once in close proximity in a sufficiently complex function, may not be written correctly. ------------------------------------------------------------------------------ FIXED SDSCM00047563 ------------------------------------------------------------------------------ Summary : Disassembler applies X cross path to wrong operand of MPYSPDP Fixed in : 7.3.13 Severity : S2 - Major Affected Component : Disassembler (dis) Description: According to the TMS320C67x/C67x+ DSP CPU and Instruction Set Reference Guide (SPRU733A), only the second operand (the double-precision input) may be fetched from the cross path. However, the disassembler was instead showing the first operand (the single-precision input) as being fetched from the cross path. ------------------------------------------------------------------------------ 6. 7.3.12 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00044738 ------------------------------------------------------------------------------ Summary : EABI partial linking omits referenced library functions which refer to unresolved symbols Fixed in : 7.3.12 Severity : S2 - Major Affected Component : Linker Description: The bug could happen when partial link is used. Also one or more files partially linked are compailed with optimization. The optimizer recognized some function as alias function. The paritial does not handle alias function correctly. ------------------------------------------------------------------------------ FIXED SDSCM00045373 ------------------------------------------------------------------------------ Summary : EXIDX section for alias function leads to INTERNAL ERROR unhandled exception Fixed in : 7.3.12 Severity : S2 - Major Affected Component : Linker Description: If all of --exceptions, --unused_section_elimination=off, and --retain=.ARM.EXIDX are used, and the compiler turns a C++ function into an alias (this is a TI-specific optimization), it is possible for the linker to retain the EXIDX section for the alias function but not the alias function itself, which leads to an internal error. ------------------------------------------------------------------------------ FIXED SDSCM00045572 ------------------------------------------------------------------------------ Summary : --gen_profile_info discards exception-handling data Fixed in : 7.3.12 Severity : S2 - Major Affected Component : Code Generator Description: If the --gen_profile_info option is used with --abi=eabi and --exceptions, the resulting executable file may be incorrect. The exception handling portion of the code may be missing from the instrumented executable. Specifically, catch blocks and code following a catch block will not be included in the executable file. ------------------------------------------------------------------------------ FIXED SDSCM00046084 ------------------------------------------------------------------------------ Summary : Hex utility incorrectly picks empty section over a non-empty section with duplicate name Fixed in : 7.3.12 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: There can be duplicate section names in an object file. When converting such a file, the hex converter will emit a warning and fail to convert the section. For this test case, it is sufficient to have the hex converter ignore zero-length sections. Handling duplicate section names, neither of which are empty, will require some redesign, and will be pursued as a separate effort. This defect report has been re-purposed as the more targeted fix of ignoring zero-length sections. See SDSCM00046936 for the ongoing work to handle duplicate section names for non-empty sections. ------------------------------------------------------------------------------ FIXED SDSCM00046142 ------------------------------------------------------------------------------ Summary : SUBDP with cross path decoded incorrectly in disassembler Fixed in : 7.3.12 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: This is a disassembly bug only happen to SUBDP instruction with its 1st operand is a crosspath operand. ------------------------------------------------------------------------------ FIXED SDSCM00046156 ------------------------------------------------------------------------------ Summary : Incorrect calculations in loop Fixed in : 7.3.12 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: A loop containing an auto-initialised array definition that is short enough to be a valid vector -- 64 bits for most C6x or 128 bits for c66, or 128 bits for ARM Neon -- may unroll and vectorise in a way that mishandles the array and causes incorrect behavior. ------------------------------------------------------------------------------ FIXED SDSCM00046175 ------------------------------------------------------------------------------ Summary : INTERNAL ERROR cg6x experienced a segmentation fault while processing function Fixed in : 7.3.12 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: This bug could only happen in C++ code with exception turned ON. Another added condition is that in this C++ code, there are excpetions thrown either in destructor or throw expression. When this bug happens, you will see an error emitted from the compiler. ------------------------------------------------------------------------------ FIXED SDSCM00046177 ------------------------------------------------------------------------------ Summary : ELF section header table not guaranteed to be aligned Fixed in : 7.3.12 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: I conclude that the linker is generating something wrong when creating relocatable output that gets corrected when it later generates executable output. A further observation after linking the relocatable linker output to form an executable, I note that the section headers are misaligned (at offset 0xaca from the start of the file). This appears to break the alignment rule from http//www.sco.com/developers/gabi/2003-12-17/ch4.intro.html#file_format "All data structures that the object file format defines follow the ``natural'' size and alignment guidelines for the relevant class. If necessary, data structures contain explicit padding to ensure 8-byte alignment for 8-byte objects, 4-byte alignment for 4-byte objects, to force structure sizes to a multiple of 4 or 8, and so forth. Data also have suitable alignment from the beginning of the file. Thus, for example, a structure containing an Elf32_Addr member will be aligned on a 4-byte boundary within the file. " Section headers contain Elf32_Addr members, and so should be aligned on a 4-byte boundary (which 0xaca isn't). It appears that the compiler is failing to pad the size of the string table to ensure the alignment of the following areas. You can see that the alignment of the section headers depends on the size of the string table by changing the function name to 'main2'. This generates an output file where the section header offset is 534. The misaligned section headers lead to a CCS crash (SDSCM00046176). ------------------------------------------------------------------------------ FIXED SDSCM00046231 ------------------------------------------------------------------------------ Summary : DATA_ALIGN should not be able to reduce alignment below default array alignment Fixed in : 7.3.12 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: With the following program #pragma DATA_SECTION(array, 4) int array[100]; Observe that the alignment of array is 32, should be 64. The DATA_ALIGN pragma should not cause an array to have an alignment that is less than the default array alignment. The DATA_ALIGN pragma is ignored if it attempts to do so. ------------------------------------------------------------------------------ FIXED SDSCM00046346 ------------------------------------------------------------------------------ Summary : Linker takes too long to link after upgrade to 7.3.X Fixed in : 7.3.12 Severity : S2 - Major Affected Component : ELF Linker Description: Long link times can be caused by the linker's type merging pass to reducethe debug section size. This problem is usually noticed in large projects that contain several hundred files or more. This problem has been addressed by an improved type merging algorithm that should reduce link times. ------------------------------------------------------------------------------ FIXED SDSCM00046812 ------------------------------------------------------------------------------ Summary : Instructions are placed in the wrong order Fixed in : 7.3.12 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: In rare cases, incorrect analysis by the compiler may indicate that two memory or stack accesses are unrelated when they actually refer to the same object. If this occurs, the compiler may schedule an access incorrectly. ------------------------------------------------------------------------------ FIXED SDSCM00046816 ------------------------------------------------------------------------------ Summary : Excessive compile time - Optimiser hangs Fixed in : 7.3.12 Severity : S2 - Major Affected Component : Optimizer Description: A program containing large structs containing many fields, especially if those fields are of type char, may require excessive time to compile. The compiler must check all those fields for potential aliases, and does so inefficiently. ------------------------------------------------------------------------------ FIXED SDSCM00046910 ------------------------------------------------------------------------------ Summary : Using an invalid option with valid hex command file causes SIGSEGV Fixed in : 7.3.12 Severity : S2 - Major Affected Component : Hex Converter (hex) Description: Using an invalid option with valid hex command file causes a segmentation fault. ------------------------------------------------------------------------------ 7. 7.3.11 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00042332 ------------------------------------------------------------------------------ Summary : Don't generate typeinfo when not used Fixed in : 7.3.11 Severity : S3 - Minor Affected Component : Code Generator Description: The C++ type info is generated under EABI whenever the virtual function table is created as per the IA64 C++ ABI requirement. However, the typeinfo is not used if RTTI or C++ exceptions are not used. Hence it is a good candidate to place in slow external memory. However, they are presently generated under .const section and hence it is difficult to selectively group and place them. The proposal is to place the typeinfo under the .const.typeinfo subsection to enable easier placement. ------------------------------------------------------------------------------ FIXED SDSCM00042417 ------------------------------------------------------------------------------ Summary : #pragma WEAK; 'if (f)' gets eliminated even if 'f' is a weak function Fixed in : 7.3.11 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: EABI mode allows weak symbol references. If the symbol is weak and not defined, its address is zero. The compiler incorrectly assumes that the address of a weak symbol is non-zero and simplfies comparisons of &symbol to true, but it should not. In other words, if the user writes "if (&symbol) symbol_is_defined();", symbol_is_defined will be called even if symbol is weak and not defined. ------------------------------------------------------------------------------ FIXED SDSCM00042444 ------------------------------------------------------------------------------ Summary : Expression that multiplies two constants incorrectly triggers MISRA rule 10.1 about implicit conversion Fixed in : 7.3.11 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: The expression ... var_int16 = 4 * 256; contains no implicit conversions. However, MISRA rule 10.1 about no implicit conversions is still emitted for that expression. ------------------------------------------------------------------------------ FIXED SDSCM00042600 ------------------------------------------------------------------------------ Summary : Ill advised enum scalar usage gets MISRA diagnostic, but similar usage of enum array does not Fixed in : 7.3.11 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: The test case given assigned a integer to an enum scalar variable. MISRA checking correctly flags this with a diagnostic. The test case goes on to do the same thing with an enum array expression. It should get the same MISRA diagnostic, but does not. For example typedef unsigned int uint16_t; uint16_t Func(void); typedef enum Error { OK, NO_DATA, BUFFER_FULL } Error_t; const Error_t errors[2] = {OK, OK}; uint16_t Func(void) { uint16_t myError; myError = OK; /* correctly flags as error (MISRA 10.1) */ myError = errors[0]; /* does not find error */ return myError; } ------------------------------------------------------------------------------ FIXED SDSCM00043229 ------------------------------------------------------------------------------ Summary : Instruction reordering alters logic Fixed in : 7.3.11 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: A sequence of code that initialises a struct by assignments to its fields, then copies the whole struct to another struct, then reads the fields individually, may sometimes read before the struct copy has happened. This situation has been observed when the initialisation is in an inlined function (and thus the struct-to-struct copy mimics the return from the callee), the struct read is defined within a scope that is not at top level, and another non-top-level scope defines a local array. ------------------------------------------------------------------------------ FIXED SDSCM00045550 ------------------------------------------------------------------------------ Summary : Truncated pointer created by cast from integer constant Fixed in : 7.3.11 Severity : S2 - Major Affected Component : Optimizer Description: For an expression of the form ((t *)c1+c2), where t is an arbitrary type and c1 and c2 are integer constants small enough to fit in a type smaller than int, the optimizer could mistakenly truncate the sum of c1 and c2 to the smaller type. It is possible for other optimizations to create this expression through simplification of other expressions. ------------------------------------------------------------------------------ FIXED SDSCM00045894 ------------------------------------------------------------------------------ Summary : Use of option -pdse195 causes an incorrect error to be generated Fixed in : 7.3.11 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: An issue where diagnostics resulting from the evaluation of unused preprocessor tokens has been fixed. This issue only arose when error #195 was escalated to warning or error. ------------------------------------------------------------------------------ FIXED SDSCM00046015 ------------------------------------------------------------------------------ Summary : Recurrence with unsigned subscript can lead to wrong answer Fixed in : 7.3.11 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: A loop with a recurrence like "x[i] = ... x[i-1] ..." or "x[i+1] = ... x[i] ..." may produce the wrong answers when i (or any other part of a complex subscript) is of an unsigned type. ------------------------------------------------------------------------------ FIXED SDSCM00046190 ------------------------------------------------------------------------------ Summary : Compiler may mishandle C symbols that resemble C++ mangled names (esp long sequences of underscores) Fixed in : 7.3.11 Severity : S2 - Major Affected Component : Optimizer Description: The compiler may mishandle C code with variables whose names resemble C++ mangled names. The one known instances is variables with a sequence of four or more consecutive underscores (eg, "x_____y"). In this case, one pass in the compiler dropped enough of the names to mistakenly think two distinct variables were only one, leading to incorrect results. ------------------------------------------------------------------------------ FIXED SDSCM00046346 ------------------------------------------------------------------------------ Summary : Linker takes too long to link after upgrade to 7.3.X Fixed in : 7.3.11 Severity : S2 - Major Affected Component : ELF Linker Description: Long link times can be caused by the linker's type merging pass to reduce the debug section size. This problem is usually noticed in large projects that contain several hundred files or more. This problem has been addressed by an improved type merging algorithm that should reduce link times. ------------------------------------------------------------------------------ FIXED SDSCM00046400 ------------------------------------------------------------------------------ Summary : op-assign of float expression to bit-field results in corrupted code Fixed in : 7.3.11 Severity : S2 - Major Affected Component : Code Generator Description: A bit-field may be assigned to with an op-assign (e.g. +=) operator. If the left hand side of the operator is a bit-field and right hand side is an expression with floating-point type, the compiler will in some cases write a corrupted value to the bit-field. ------------------------------------------------------------------------------ FIXED SDSCM00046414 ------------------------------------------------------------------------------ Summary : Compiler may incorrectly read too soon when single element and aggregate are used together Fixed in : 7.3.11 Severity : S2 - Major Affected Component : Optimizer Description: The conditions which expose the defect are the following 1) -o2 or –o3 2) A local array where reads from adjacent addresses occur after a write to the array. This could be array elements or struct fields. Or, a local union containing a struct which is first initialized one field at a time. Then, the whole struct is written to. Finally, the struct is read one field at a time. Note this case can arise implicitly if a local struct is defined in an inner scope. Below is a local union example union sample_union { POINT_XY point; int an_array[2]; }; int CheckArea( POINT_XY* corner ) { union sample_union abc; int x, y; // write to struct in union one field at a time abc.point.x = 5; abc.point.y = 6; … // write to whole struct in union abc.point = corner; … // read from struct in union one field at a time x = abc.point.x; y = abc.point.y; } 3) The structure is defined as local variables in the function, not global. 4) The phenomenon is not occur if the structure is defined in the upper function, and the structure pointer is sent from upper function to the function as an argument. Summary Cases where the compiler does both individual field accesses and combined aggregate accesses may lead to incorrect results. The symptom is that data is read before it has been written. In this particular example, two adjacent struct fields, in the same struct of a local array of structs, are combined into the same read and read before the individual fields have been written. ------------------------------------------------------------------------------ 8. 7.3.10 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00042581 ------------------------------------------------------------------------------ Summary : Linker fails with internal error lnk6x failed to allocate memory Fixed in : 7.3.10 Severity : S2 - Major Affected Component : Linker Description: The linker could report an internal error due to a memory allocation failure in certain cases. This bug involves the linker options --make_static, --localize, or --hide. If any of these options is used in a partial link, then the final link may produce the internal error. The linker was localizing comdat symbols during the partial link, which is incorrect behavior. The result was that the comdat symbols could not be resolved in the final link, but this was not detected properly, causing the memory allocation failure. One example of a comdat symbol is a static data member of a template class. The static data member must be resolved to a single instance, so it can not be localized during the partial link. This bug fix ensures that --make_static, --localize, and --hide do not affect comdat symbols during the partial link, and lists these symbols in the mapfile if requested. Also, if a similar symbol resolution error is encounted due to some other cause, the linker will now detect and report the error instead of encountering a memory allocation error later in the linking process. This is an update to the fix added to version 7.3.3. ------------------------------------------------------------------------------ FIXED SDSCM00044393 ------------------------------------------------------------------------------ Summary : Linker silently ignores an output section placement spec with missing ">" in the SECTIONS directive Fixed in : 7.3.10 Severity : S3 - Minor Affected Component : Linker Description: When previously parsing linker command files, the linker required the ">" to specify memory addresses for sections (i.e. sec1 > MEM1). The ">" operator is now optional as the documentation states it should be. ------------------------------------------------------------------------------ FIXED SDSCM00044503 ------------------------------------------------------------------------------ Summary : Linker does not handle double-slash (//) in path names properly Fixed in : 7.3.10 Severity : S2 - Major Affected Component : Linker Description: Linker does not handle double-slash (//) in path names properly. A command line the following cl6x -z -o=main.out a/b//c/d/file.obj fails with the following message "/tmp/14635KpAAoj", line 4 fatal error unrecognized file "a/b" >> Compilation failure This only happens when an options command file is used to pass the options to the linker; the compiler will now ensure that these filepaths are quoted to allow the linker to parse them unambiguously. ------------------------------------------------------------------------------ FIXED SDSCM00045036 ------------------------------------------------------------------------------ Summary : Internal error when no suitable delete operator is present in destructor Fixed in : 7.3.10 Severity : S2 - Major Affected Component : Parser Description: There are 3 delete operators as defined by the standard (6 if you count array deletes) void operator delete (void* ptr) throw (); void operator delete (void* ptr, const stdnothrow_t& nothrow_constant) throw(); void operator delete (void* ptr, void* voidptr2) throw(); The default operator delete is the first one there, and is required to be visible to virtual destructor definitions. The one provided by the code is the non-default third overloaded version of operator delete. Another rule regards member functions, and states that if a member function shadows a function declared in another scope, and the function declared in another scope is overloaded, those overloaded functions are invisible to the class. With both of these code-related issues together, the compiler enters into an erroneous state. The member function operator delete causes the default operator delete to become invisible to the class' scope. Finally, while defining the virtual destructor, a default delete function cannot be found (which must be called according to the IA64 rules for virtual constructors), resulting in a segfault. ------------------------------------------------------------------------------ FIXED SDSCM00045381 ------------------------------------------------------------------------------ Summary : Read of array element, before memcpy() overwrites it, may be out of order Fixed in : 7.3.10 Severity : S2 - Major Affected Component : Optimizer Description: The two statements a = x[0]; memcpy(&x[0], &x[1], K); may not occur in the correct order under certain conditions at -o2 and above. The memcpy() may overwrite the first element before it is saved in the variable. The problem is specific to memcpy(). ------------------------------------------------------------------------------ FIXED SDSCM00045562 ------------------------------------------------------------------------------ Summary : Multiplication by power-of-2 wider than int may use wrong type Fixed in : 7.3.10 Severity : S2 - Major Affected Component : Optimizer Description: When multiplying a variable of a type the same size as int, or smaller, by a constant power of two with a type wider than int, the compiler may convert the multiply into a shift-left, and use the wrong type, thus computing the wrong answer. ------------------------------------------------------------------------------ FIXED SDSCM00045660 ------------------------------------------------------------------------------ Summary : Different code generated on Linux and PC under the same option for the same source code Fixed in : 7.3.10 Severity : S2 - Major Affected Component : Optimizer Description: In some cases, the same code compiled with the same version of the compiler may produce different asm on Windows than on Linux. The reason is some unstable sorting of equivalent internal rules and inlineable call sites. The two systems will sort differently in these cases and the resulting asm will vary; in some cases, performance will also be different. ------------------------------------------------------------------------------ FIXED SDSCM00046075 ------------------------------------------------------------------------------ Summary : disassembler display wrong hex prefix for constant in compact instruction Fixed in : 7.3.10 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: This bug happens in disassembler. Some numbers from ucst5 field of the instruction is printed with an extra "0x" prefix which make the number a wrong value if it is interpreted in hex format. ------------------------------------------------------------------------------ 9. 7.3.9 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00042974 ------------------------------------------------------------------------------ Summary : Resource conflict between instruction in SPLOOP and instruction in its epilog causing hardware exception Fixed in : 7.3.9 Severity : S2 - Major Affected Component : Code Generator Description: This bug only happens at the epilog area of a SPLOOP. It could cause resource conflict which leads to a hardware exception. There is no obvious link between the user's C source code to this bug so it is hard to avoid this problem at the source code level. The fix of this bug could cause performance degradation. Usually this happens for an early exit SPLOOP where the loop's trip count is less than the number of iterations running in parallel. The performance could be severly worse if this SPLOOP is the inner loop and the outer loop executes many times. If this happens, there is no work around to fix this problem. This fix could also cause code size increase. But it is minimal. Usually it is one NOP per SPLOOP. ------------------------------------------------------------------------------ FIXED SDSCM00044285 ------------------------------------------------------------------------------ Summary : scanf %[^ mistakenly writes EOF to output Fixed in : 7.3.9 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: When using ^ to negagte the scan set [ sscanf(in, "%[^abc]", out) ], scanf would incorrectly copy EOF to the output string. It should instead stop reading input and return as normal. Workaround: Negate the scan set manually; don't use the negation operator. ------------------------------------------------------------------------------ FIXED SDSCM00044581 ------------------------------------------------------------------------------ Summary : Optimizer continues abort after CQ44463 Fixed in : 7.3.9 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) ------------------------------------------------------------------------------ FIXED SDSCM00045105 ------------------------------------------------------------------------------ Summary : Empty struct as field of parent struct may cause optimiser abort Fixed in : 7.3.9 Severity : S2 - Major Affected Component : Optimizer Description: If a struct contains another struct, and the inner struct has no fields, and the parent struct is copied whole through an assignment of struct-type variables, the optimiser may abort. ------------------------------------------------------------------------------ FIXED SDSCM00045197 ------------------------------------------------------------------------------ Summary : strip6x segmentation fault on ELF executable Fixed in : 7.3.9 Severity : S2 - Major Affected Component : Strip Utility ------------------------------------------------------------------------------ FIXED SDSCM00045232 ------------------------------------------------------------------------------ Summary : Incorrect linker symbol value after multiple partial links Fixed in : 7.3.9 Severity : S2 - Major Affected Component : ELF Linker Description: Linker symbols whose values depend on section placement were getting assigned absolute values instead of section relative values in partial links. These are symbols that are defined using the '.' operator, and/or those defined using the linker command file keywords such as START, END, LOAD_START etc. As a result, the final link would assign incorrect values to these symbols. ------------------------------------------------------------------------------ 10. 7.3.8 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00043174 ------------------------------------------------------------------------------ Summary : Linker fails to honor specific placement for function from RTS library Fixed in : 7.3.8 Severity : S2 - Major Affected Component : COFF Linker Description: Linker now honors section placement specification. ------------------------------------------------------------------------------ FIXED SDSCM00044222 ------------------------------------------------------------------------------ Summary : Arm _set_interrupt_priority intrinsic and C6x __mfence() intrinsic should be treated as a barrier in the compiler. Fixed in : 7.3.8 Severity : S2 - Major Affected Component : Optimizer Description: There are 2 intrinsics that should be treated as a barrier in the compiler but are not. They are 1. C6x _mfence intrinsic 2. ARM _set_interrupt_priority intrinsic This means that loads and stores (memory operations) above and below the intrinsics should not move across the intrinsic. It is possible that such an instruction could be scheduled before or after the intrinsic. ------------------------------------------------------------------------------ FIXED SDSCM00044450 ------------------------------------------------------------------------------ Summary : Parser allows virtual base classes that are too large Fixed in : 7.3.8 Severity : S3 - Minor Affected Component : Parser Description: In EABI, due to the RTTI implementation, the compiler can only handle virtual base classes of a certain size. The parser incorrectly computed this size and did not emit a warning for very large virtual base classes that were too large. This would lead to data corruption. ------------------------------------------------------------------------------ FIXED SDSCM00044561 ------------------------------------------------------------------------------ Summary : ASG error in cg6x Fixed in : 7.3.8 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Fixed code causing the following codegen crash INTERNAL ERROR no match for ASG ------------------------------------------------------------------------------ FIXED SDSCM00044618 ------------------------------------------------------------------------------ Summary : lnk6x runs out of memory when using --preferred_order in large application Fixed in : 7.3.8 Severity : S2 - Major Affected Component : ELF Linker Description: The linker can experience significant system memory usage and some leakage while using the --preferred_order option during the link step of a large application build. The leakage can be significant if the application is compiled with debug (-g option). In some cases where available system memory is limited (2GB PC system, for example), the excessive system memory usage can cause the linker to run out of memory. ------------------------------------------------------------------------------ FIXED SDSCM00044735 ------------------------------------------------------------------------------ Summary : EXIDX_CANTUNWIND yields invalid memory read Fixed in : 7.3.8 Severity : S2 - Major Affected Component : Runtime Support Libraries (RTS) Description: If an exception is thrown that tries to propagate up through any C-compiled function, the RTS must call stdterminate(). The linker is responsible for fabricating CANTUNWIND entries in the EXIDX table for C functions so that the unwinder knows it has unwound to a C function. If the C function happens to be placed after the last C++ text section, the linker doesn't create such an EXIDX entry. This is a bug in the RTS. The EXIDX lookup does check whether it is running off the end of the EXIDX table, but when it does, it mistakenly attempts to read a value from just beyond the end of the table. This problem only occurs in EABI. Workaround: This bug can only occur when the program is terminating due to a problem with an uncaught exception. To work around the issue, ensure that C++ functions which might be called from a C function catch all exceptions. ------------------------------------------------------------------------------ FIXED SDSCM00044775 ------------------------------------------------------------------------------ Summary : Missed dependence between x[i+4] and x[i] when i unsigned Fixed in : 7.3.8 Severity : S2 - Major Affected Component : Optimizer Description: A loop with a write to x[i+k1] and a read from x[i+k2], where i is an unsigned integral type and k1 and k2 are constants, may produce incorrect answers, because the compiler will not recognise the dependence between the two accesses. Whether or not the result is correct is due to variations in the scheduling of instructions in the compiler output. The compiler misses the dependences because it doesn't properly sign-extend the unsigned difference computation and ends up with a large positive number instead of the correct small negative one. ------------------------------------------------------------------------------ FIXED SDSCM00044799 ------------------------------------------------------------------------------ Summary : pprof6x aborts during compile which uses profile data to analyze the call graph Fixed in : 7.3.8 Severity : S2 - Major Affected Component : Path Profiler (pprof) Description: pprof6x may abort the compilation when using profile data (--use_profile_info option) and analyzing callgraph information (--analyze=callgraph option). The issue will at least come up in cases where the application contains at least one C++ global object that requires initialization and is using entry/exit hook functions. Workaround: Can possibly avoid the problem by removing the use of --entry_hook option. A more drastic workaround would be to avoid using the --use_profile_info option. ------------------------------------------------------------------------------ 11. 7.3.7 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00044048 ------------------------------------------------------------------------------ Summary : Enabling vectorization produces incorrect code Fixed in : 7.3.7 Severity : S2 - Major Affected Component : Optimizer Description: In certain cases, enabling vectorization could result in incorrect code being generated. ------------------------------------------------------------------------------ FIXED SDSCM00044377 ------------------------------------------------------------------------------ Summary : Disassembler fails to decode LDNDW when scaling mode is used Fixed in : 7.3.7 Severity : S3 - Minor Affected Component : Disassembler (dis) Description: The disassembler would mistakenly fail to disassemble LDNDW and STNDW when scaling mode was used. The instruction would instead be shown as a .word. ------------------------------------------------------------------------------ FIXED SDSCM00044445 ------------------------------------------------------------------------------ Summary : codegen access wrong address which causes hardware exception Fixed in : 7.3.7 Severity : S2 - Major Affected Component : Code Generator Description: During loop prolog collapsing, the compiler illegally speculated a load instruction without checking all of the load's data dependencies. ------------------------------------------------------------------------------ FIXED SDSCM00044463 ------------------------------------------------------------------------------ Summary : gcc packed attribute causes both codegen and optimizer error Fixed in : 7.3.7 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: If a struct type is given the "packed" attribute via "__attribute__((packed))" but anonymous structs and unions within it are not given that attribute, the compiler may crash. Without optimisation or with -o0 or -o1, the problem will happen only without "--abi=eabi"; with -o2 and above, the problem will happen with or without "--abi=eabi". ------------------------------------------------------------------------------ FIXED SDSCM00044536 ------------------------------------------------------------------------------ Summary : Fix to CQ44227 causes incompatible object code resulting in link failure Fixed in : 7.3.7 Severity : S2 - Major Affected Component : ELF Linker ------------------------------------------------------------------------------ 12. 7.3.6 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00037422 ------------------------------------------------------------------------------ Summary : Incorrect layout in .cdecls struct Fixed in : 7.3.6 Severity : S3 - Minor Affected Component : Assembler Description: The attached test case defines a structure which contains a union. The last field in the structure is assigned the offset 9 by the compiler. The assembler, via .cdecls, assigns that same field the offset 10. ------------------------------------------------------------------------------ FIXED SDSCM00041434 ------------------------------------------------------------------------------ Summary : Compiler optimizes away certain calls to assert() Fixed in : 7.3.6 Severity : S3 - Minor Affected Component : Absolute Lister Description: Certain assert() statements, most notably "assert(x&1)" and the equivalent "assert(x%2==0)", may be removed by the compiler and thus will not do the run-time condition check that is desired. ------------------------------------------------------------------------------ FIXED SDSCM00042194 ------------------------------------------------------------------------------ Summary : Partial link drops weak function symbol Fixed in : 7.3.6 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) ------------------------------------------------------------------------------ FIXED SDSCM00042292 ------------------------------------------------------------------------------ Summary : In EABI mode string literals used in member functions result in static members of the class and not placed in .const.string Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Parser Description: In the attached file, the class member Aoperation uses string literals. Instead of creating the string literals the parser is generating static char array member and initializes it to the string chars. ------------------------------------------------------------------------------ FIXED SDSCM00042408 ------------------------------------------------------------------------------ Summary : Linker creates overlapping sections when section allocation is done using ">>" operator Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Linker Description: Linker may create overlapping sections when section allocation is done using ">>" operator ------------------------------------------------------------------------------ FIXED SDSCM00042789 ------------------------------------------------------------------------------ Summary : Register allocation fails at ii=4, but succeeded in 7.3.0 compiler Fixed in : 7.3.6 Severity : S1 - Critical / PS Affected Component : Code Generator Description: In some rare cases register allocation might fail on a software pipelined loop, when it succeeded in a previous compiler release. This would typically occur on loops where most or all of the registers are allocated. ------------------------------------------------------------------------------ FIXED SDSCM00043207 ------------------------------------------------------------------------------ Summary : Compiler reads from stack frame after releasing it Fixed in : 7.3.6 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: The compiler may incorrectly move an access of a stack location past the function return point where the stack location has been deallocated. ------------------------------------------------------------------------------ FIXED SDSCM00043700 ------------------------------------------------------------------------------ Summary : Stack and aggregates should be 8-byte aligned for C66 Fixed in : 7.3.6 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) ------------------------------------------------------------------------------ FIXED SDSCM00043713 ------------------------------------------------------------------------------ Summary : Linker fails with internal error Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Linker Description: Linker sometimes fails with internal error lnk470.exe experienced an unhandled exception The linker no longer makes the assumption that the decompression routine's section can be automatically removed when the linker determines the decompression routine is not needed. ------------------------------------------------------------------------------ FIXED SDSCM00043770 ------------------------------------------------------------------------------ Summary : Intentional alias between two congruent IF tests may simplify incorrectly Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Optimizer Description: Code like p = &x; if (x) ... *p = ... if (x) ... may compile incorrectly, as the compiler will miss the effect that the write to *p has on the value of x in the second IF. ------------------------------------------------------------------------------ FIXED SDSCM00043789 ------------------------------------------------------------------------------ Summary : cg6x run out of memory Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Code Generator Description: This bug is caused by final scheduling of insrtuctions after interblock scheduling. The scheduler tries to work out a scheduling by inserting infinite number of empty blocks. No obvious C source codes could trigger this bug. ------------------------------------------------------------------------------ FIXED SDSCM00043807 ------------------------------------------------------------------------------ Summary : Register initialization lost during instruction predication Fixed in : 7.3.6 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: When converting control flow to predicated instructions, in rare cases the compiler could mistakenly discard some instructions which were unpredicatable or were already predicated. This will cause the generated code to work incorrectly in unpredictable ways. ------------------------------------------------------------------------------ FIXED SDSCM00043868 ------------------------------------------------------------------------------ Summary : Linker cannot find include file specified with relative path Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Linker Description: None Workaround: This bug occurs because the linker does not properly reset the source path after processing an #include, causing a second #include to be relative to the wrong path. Any intervening token between the two #include directive will overcome this, as will any macro expansion (even if empty). For example #define SPACE #include "../first.cmd" SPACE #include "../second.cmd" ------------------------------------------------------------------------------ FIXED SDSCM00043874 ------------------------------------------------------------------------------ Summary : START() and SIZE() in linker script, changed behavior Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Linker ------------------------------------------------------------------------------ FIXED SDSCM00043948 ------------------------------------------------------------------------------ Summary : IF predicate with negative integer factor simplifies incorrectly Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Optimizer Description: An IF predicate with a negative integer factor -- eg, "if (x*(-3) == -9)" -- may be simplified incorrectly, for instance to "if (x == -3)" instead of the correct "if (x == 3)". ------------------------------------------------------------------------------ FIXED SDSCM00043966 ------------------------------------------------------------------------------ Summary : Second instance of three-operand associative op may miscompile Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Optimizer Description: If two three-operand expressions using the same associative operator and two of the same operands occur in the same function -- for example, x*x*x and 30*x*x -- the second expression may miscompile and be treated as identical to the first. ------------------------------------------------------------------------------ FIXED SDSCM00044012 ------------------------------------------------------------------------------ Summary : Optimizer crash in _AO_findMinMax Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Optimizer Description: Certain intrinsic operations are commutative -- their operands can occur in either order. Many of these are parallel versions of common commutative operations, like _add2, or specialised versions, like _smpy. Minimum and maximum operations also have commutative intrinsics, _min2 and _maxu4 for example. When one of these commutative intrinsics appears in a reduction -- an expression like x = _op(x, k); -- inside nested loops, the optimiser may crash. It is looking for similar kinds of expressions, but isn't handling intrinsics correctly. The compiler will either produce correct code here, or crash; it will not silently produce incorrect code. Some of these intrinsics can be introduced by the compiler itself, based on the original source code. The motivating case for this bug report looks like for (i = a; i < b; i++) for (j = c; j < d; j++) { t = ...; if (t < min) min = t; } and the compiler transformed the IF into _min2. For the problem to occur, the required ingredients are a commutative intrinsic or expressions that can be transformed into one, inside a nest of two loops that are simple enough that the outer loop may be unrolled. The workaround is to add "#pragma UNROLL(1)" to the outer loop, or to compile at -o1 or -o0, to prevent the transformation where the crash occurs. ------------------------------------------------------------------------------ FIXED SDSCM00044066 ------------------------------------------------------------------------------ Summary : opt470 experienced a segmentation fault Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Optimizer Description: Corrected false assumption made while performing an optimization. ------------------------------------------------------------------------------ FIXED SDSCM00044227 ------------------------------------------------------------------------------ Summary : Compiler may not ensure uniqueness of static variables in C++ templates Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Parser Description: In EABI mode, static variables in template functions and static data members of template classes may not be properly allocated and/or initialized. Templates are typically defined in header files, resulting in separate instances in each translation unit (source file). The tools must merge these multiple instances into unique instances, and ensure that static objects are allocated and initialized only once. There are three specific cases in which these mechanisms may fail, resulting in incorrect behavior of the program. They are 1. A static variable in a template function, or a static variable in a member function of a template class, may not be allocated as a single unique object. This error occurs only when all of the following conditions occur - the function is not declared inline, AND - the function is not implicity inline by virtue of having its body defined within the template class, AND - the function body is compiled in multiple translation units (i.e. the definition is in a header file). For example template void f() { static int var; // ... } If this function definition is compiled into multiple translation units, the compiler may incorrectly create multiple instances of 'var'. Additionally, the compiler may incorrectly allocate 'var' into a section with other variables. This may cause unexpected behavior during linking, such as incorporating of unreferenced sections into the link, or changing the contents of the data section from link to link (depending on which copy of 'f()' arbitrarily gets linked in). A workaround for this defect is to declare the function f() as inline. 2. Under the same conditions described in case 1, if the static variable is initialized with a constructor, the constructor may incorrectly be called multiple times. For example template void f() { static T var; // ... } The constructor TT() may be called multiple times to initialize 'var'. Declaring f() as inline also works around this problem. 3. Similarly, if a static data member of a template class is initialized with a constructor, the constructor may incorrectly be called multiple times. This occurs only when all of the following conditions occur - the definition (not the declaration) of the data member appears in multiple translation units, AND - the member is referenced in multiple translation units in which the definition occurs. For example template class MyClass { static T var; // declaration }; // definition template T MyClassvar; // may call TT() multiple times A workaround for case 3 is to move the definition from a header file to a .cpp file, so that it only occurs once. Workaround: 1. If a template function, or member function of a template class, has a static varaible, declare the function 'inline'. 2. If a template class has a static data member with initialization by constructor, put the definition of the data member in a .cpp file rather than a .h file. ------------------------------------------------------------------------------ FIXED SDSCM00044302 ------------------------------------------------------------------------------ Summary : opt6x emits an invalid symbol uid in the I-file as part of a load speculation advice record Fixed in : 7.3.6 Severity : S2 - Major Affected Component : Optimizer Description: Load-speculation advice, generated internally by the optimiser, may refer to symbols using an invalid index, which may cause a crash during compilation. ------------------------------------------------------------------------------ 13. 7.3.5 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00042914 ------------------------------------------------------------------------------ Summary : Linker segfault using partial link output file of C++ source with ELF and exceptions enabled Fixed in : 7.3.5 Severity : S2 - Major Affected Component : ELF Linker Description: The linker fails with a segmentation fault when using a file created by partial linking C++ code with exceptions enabled and using the ELF file format. While the first (partial) link appears to succeed, a second link using the (corrupted) output file from the partial link causes the linker to segfault and stop. ------------------------------------------------------------------------------ FIXED SDSCM00043316 ------------------------------------------------------------------------------ Summary : Arithmetic fails in GROUP directive Fixed in : 7.3.5 Severity : S2 - Major Affected Component : Linker Description: Arithmetic expressions are now permitted as address specifiers in the SECTIONS section of a linker command file, as in the MEMORY section. ------------------------------------------------------------------------------ FIXED SDSCM00043376 ------------------------------------------------------------------------------ Summary : data array copy got wrong results Fixed in : 7.3.5 Severity : S2 - Major Affected Component : Code Generator Description: This bug only happens when SPLOOP is interrupted and there are registers in the SPLOOP that have two live ranges, or there are multiple assigned registers in the SPLOOP. When interrupt is returned back to the SPLOOP, the register content can not be correctly restored thus leads to error. ------------------------------------------------------------------------------ FIXED SDSCM00043377 ------------------------------------------------------------------------------ Summary : In the generated assembly file comments always say no -ms option even when -ms option is used for the build Fixed in : 7.3.5 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: In the compiler generated assembly file, the comments always say no -ms option was used even when -ms option is used for the build. ------------------------------------------------------------------------------ FIXED SDSCM00043642 ------------------------------------------------------------------------------ Summary : Compiler incorrectly simplifies "(x >> k1) < k2" when k2 is constant smaller than int Fixed in : 7.3.5 Severity : S1 - Critical / PS Affected Component : C/C++ Compiler (cl) Description: Given an IF with a predicate like "(x >> k1) < k2", the compiler will attempt to convert it to "x < (k2< int main(void) { return 2; } Then compile with the following flags cl6x a.cpp -pdv -pdr include/stddef.h", line 87 remark #195-D zero used for undefined preprocessing identifier (__STDC_VERSION__ >= 199901L || !__TI_STRICT_ANSI_MODE__) This happens because __STDC_VERSION__ is not defined in C++ mode ------------------------------------------------------------------------------ FIXED SDSCM00042053 ------------------------------------------------------------------------------ Summary : Near a software pipelined loop that comes from an include file, the .dwpsn directives have the wrong file name Fixed in : 7.3.3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Fixed a bug where debug information near an inlined loop could contain the incorrect file name. ------------------------------------------------------------------------------ FIXED SDSCM00042202 ------------------------------------------------------------------------------ Summary : Compiler does not inline constructors in some instances in EABI Fixed in : 7.3.3 Severity : S3 - Minor Affected Component : Parser Description: In some instances under EABI mode, the C6x compiler may not inline constructors and destructors as efficiently when compiled for COFF. ------------------------------------------------------------------------------ FIXED SDSCM00042256 ------------------------------------------------------------------------------ Summary : Parser generates illegal EH table on modified cpp_peren_eh testcase Fixed in : 7.3.3 Severity : S2 - Major Affected Component : Parser Description: This bug only happens for C++ file for which the exception handing is enabled under EABI. ------------------------------------------------------------------------------ FIXED SDSCM00042368 ------------------------------------------------------------------------------ Summary : Parser generates segmentation fault Fixed in : 7.3.3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Parser generates segmentation fault when compiling the following source file static const int a[1]; int main(void) { (void)a[0]; return 0; } static const int a[1] = { 0 }; ------------------------------------------------------------------------------ FIXED SDSCM00042395 ------------------------------------------------------------------------------ Summary : linker sorts input section specifications incorrectly Fixed in : 7.3.3 Severity : S2 - Major Affected Component : ELF Linker Description: Linker sorts input sections specifications incorrectly. Even though a fairly restrictive input section specification is used to dictate the placement of the .text section from a particular file in a library, the section is mapped into a different output section by a less restrictive input section specification that is actually specified after the more restrictive input section specification. ------------------------------------------------------------------------------ FIXED SDSCM00042454 ------------------------------------------------------------------------------ Summary : _extu((x>>a), b, c) incorrectly simplified when b>c Fixed in : 7.3.3 Severity : S2 - Major Affected Component : Optimizer Description: Use of a right shift operator in a _extu intrinsic generates incorrect code with optimization. ------------------------------------------------------------------------------ FIXED SDSCM00042506 ------------------------------------------------------------------------------ Summary : Quest/colon (?) expression on floats, cast to int, may cause compiler hang Fixed in : 7.3.3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: The compiler may hang in the optimiser stage when given a quest/colon (?) expression of floating-point type which is cast to int, when compiling at -o2 or higher. The problem is specific to ?, not to other expressions, and requires the mixture of floating and integral types. ------------------------------------------------------------------------------ FIXED SDSCM00042561 ------------------------------------------------------------------------------ Summary : CGTools 6.0.29 generates wrong code with -o3 Fixed in : 7.3.3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: This bug is caused by incorrect optimization on IF branches. There is no obvious or simple trigger condition we can list at the C source code level. When this bug happens, instructions on a branch could be wrongly executed thus leads to wrong results. ------------------------------------------------------------------------------ FIXED SDSCM00042563 ------------------------------------------------------------------------------ Summary : Optimiser crashes on certain loop cases Fixed in : 7.3.3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Certain loop structures, which we are not able to describe concisely, can cause the optimiser to crash when compiling at -o2 or higher. The one known example involves C++ code and a lot of inlining; adjusting the inlining avoids the problem. ------------------------------------------------------------------------------ FIXED SDSCM00042570 ------------------------------------------------------------------------------ Summary : Missing MISRA 19.15 Fixed in : 7.3.3 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: MISRA 19.15 not selectable in CCS v5.1. ------------------------------------------------------------------------------ FIXED SDSCM00042581 ------------------------------------------------------------------------------ Summary : Linker fails with internal error lnk6x failed to allocate memory Fixed in : 7.3.3 Severity : S2 - Major Affected Component : Linker Description: Linker fails with "internal error lnk6x failed to allocate memory" when linking large applications. ------------------------------------------------------------------------------ FIXED SDSCM00042619 ------------------------------------------------------------------------------ Summary : Optimizer crashes given unrolled nested loops and lots of aliasing Fixed in : 7.3.3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: The C6x optimiser will attempt to improve performance, when it cannot tell when certain memory accesses may alias, by testing at runtime for overlap among objects and choosing either an optimistic or conservative version of a loop, depending on the measured safety. The runtime test is composed of a collection of pairwise comparisons of object starting and ending addresses. There is a limit to how big the test can be -- otherwise it might take longer to test than to run the loop -- but that limit is checked *after* the predicate is built. In this example, the predicate was huge, large enough that its construction caused a stack overflow on Windows. The patch for this bug tests for such exceptional cases early enough to avoid the overflow. Why was the predicate huge? The loop was something like for (j = 0; j < x->n; j++) { for (i = 0; i < 34; i++) x->y->a[j][i] = x->aa[j][i]; for (i = 0; i < 34; i++) x->y->b[j][i] = x->bb[j][i]; } } where n is a char and a[], aa[], b[], and bb[] are all arrays of char. The inner-loop trip counts are constant and small enough to allow the inner loops to unroll completely. Each of the resulting 68 statements in the now-single loop contains multiple memory references, and the outer-loop trip count is also a memory reference. Pointers-to-char are allowed to point to objects of any type, which means that nearly any two memory references within the loop may be aliased and will be included in the runtime test. ------------------------------------------------------------------------------ FIXED SDSCM00042632 ------------------------------------------------------------------------------ Summary : Functions declared static get global visibility when compiled with optimization in EABI mode Fixed in : 7.3.3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Fixed a bug wherein two functions, one static and one global where one function contains code and the other simply calls the first, were aliased together, essentially removing the static state of one function and causing it to be visible globally. ------------------------------------------------------------------------------ FIXED SDSCM00042669 ------------------------------------------------------------------------------ Summary : Compiler aborts with message about "Corrupted IR detected during check_mve/spilling" Fixed in : 7.3.3 Severity : S2 - Major Affected Component : Code Generator Description: In extremely rare circumstances, the compiler may abort and issue an error message such as the following "Renamed pair with base above window. Corrupted IR detected during check_mve/spilling" ------------------------------------------------------------------------------ FIXED SDSCM00042704 ------------------------------------------------------------------------------ Summary : Conversion from double to __int40_t in EABI gives garbage in upper bits Fixed in : 7.3.3 Severity : S2 - Major Affected Component : Runtime Support Libraries (RTS) Description: For EABI, all of the __int40_t <-> floating-point conversions mistakenly operated only on the lower 32 bits of the integer value. When converting from signed or unsigned __int40_t to a floating-point type, garbage bits would be used for the most significant 8 bits of the integer value, potentially giving floating-point values that were very wrong. When converting from a floating-point type to signed or unsigned __int40_t, the result would have garbage bits in the most significant 8 bits, potentially giving __int40_t value that were very wrong. ------------------------------------------------------------------------------ FIXED SDSCM00042717 ------------------------------------------------------------------------------ Summary : Compiler stops with error "Corrupted IR detected" message Fixed in : 7.3.3 Severity : S2 - Major Affected Component : Code Generator Description: In extremely rare cases when compiling linear assembly source code which contains inner loops, the compiler may stop and emit an error that says, "Corrupted IR detected during check_mve/spilling". ------------------------------------------------------------------------------ FIXED SDSCM00042768 ------------------------------------------------------------------------------ Summary : norm_l(0) and norm_s(0) give the wrong value Fixed in : 7.3.3 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: norm_l and norm_s are supposed to return the number of left shifts needed to left-justify the signed input value. The definitions of these macros gsm.h would return non-zero values. This often doesn't matter, because a common idiom is L_shl(x, norm_l(x)), which for x==0 will have the value 0 no matter what norm_l(0) returns. However, if the value of norm_l(0) is directly needed, the value was wrong. ------------------------------------------------------------------------------ 16. 7.3.2 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00038452 ------------------------------------------------------------------------------ Summary : C6000 Compiler generates resource conflict in 64+ assembly output Fixed in : 7.3.2 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: This bug is caused by missing DEF-DEF edge when the relevant register is not liveout of the block. Very rare this bug can be triggered. If this bug happens, we will see hardware exception that two writes to the same register at the same cycle. ------------------------------------------------------------------------------ FIXED SDSCM00041042 ------------------------------------------------------------------------------ Summary : Absolute difference of unsigned-char, accumulated in signed integer, may produce incorrect answer Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Optimizer Description: A loop that performs an absolute difference of two unsigned-chars (ie, abs(x[i]-y[i]), where x[] and y[] are arrays of unsigned-char), and accumulates the total in a signed integer, may produce the wrong answer when compiled at -o2 or above. ------------------------------------------------------------------------------ FIXED SDSCM00041468 ------------------------------------------------------------------------------ Summary : When linker is invoked with --abi=eabi and the linker opens a COFF library, it should issue a diagnostic Fixed in : 7.3.2 Severity : S3 - Minor Affected Component : Linker ------------------------------------------------------------------------------ FIXED SDSCM00041471 ------------------------------------------------------------------------------ Summary : dis6x crash with very long identifier names Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Disassembler (dis) ------------------------------------------------------------------------------ FIXED SDSCM00041565 ------------------------------------------------------------------------------ Summary : Optimizer error, 2-dimensional array, 2 multiplications Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Optimizer Description: The optimiser may abort if it encounters a sum of a pair of multiplies which can be represented as a _dotp2 call, if the operands are adjacent array references. Multiplies of scalar variables are not affected, and _dotp2 possibilities that require unrolling a loop are not affected. ------------------------------------------------------------------------------ FIXED SDSCM00041569 ------------------------------------------------------------------------------ Summary : Optimizer removes weak object pointer check Fixed in : 7.3.2 Severity : S3 - Minor Affected Component : Optimizer Description: The optimiser believed that UAND-of-NAME was always non-NULL. That's not true for weak symbols. ------------------------------------------------------------------------------ FIXED SDSCM00041595 ------------------------------------------------------------------------------ Summary : Compiler produces incorrect result at -o2 for C64x Fixed in : 7.3.2 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Optimizer sometimes produces incorrect results at -o2 ------------------------------------------------------------------------------ FIXED SDSCM00041776 ------------------------------------------------------------------------------ Summary : Optimizer substitutes packed bitfield reference without masking value at -o1 Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Optimizer Description: Under certain specific circumstances, the compiler may replace an assignment to a bitfield with a temporary variable whose value has not been properly truncated as the original assignment did. To cause the bug, several passes that do the right thing must be inhibited; one known way is to use -o1 and a packed struct. ------------------------------------------------------------------------------ FIXED SDSCM00041828 ------------------------------------------------------------------------------ Summary : Internal error when compiling c++ code Fixed in : 7.3.2 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Use of an anonymous namespace in eabi mode causes a parser crash. ------------------------------------------------------------------------------ FIXED SDSCM00041883 ------------------------------------------------------------------------------ Summary : On C6600, interrupt in _push_rts could cause stack to be not aligned to 16-bytes as required Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Runtime Intrinsics Description: This bug only happens when interrupt routine is called during the normal function call's push/restore registers. The push and restore register operation will violate the stack 128 bit alignment convention on C66. ------------------------------------------------------------------------------ FIXED SDSCM00041888 ------------------------------------------------------------------------------ Summary : Compiler incorrectly exposes static function as global, when building with optimization and EABI Fixed in : 7.3.2 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Fixed bug where a static function that only calls another function would be considered a global symbol. The .symalias assembly directive turns any symbol attached to it into a global symbol. When compiling in EABI mode, if a static function is aliased with another function, it will be exposed incorrectly as a global symbol. ------------------------------------------------------------------------------ FIXED SDSCM00041925 ------------------------------------------------------------------------------ Summary : C++ name mangling for global string object causes linker conflict if project contains files with same filename Fixed in : 7.3.2 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: In a project where global stdstring objects are defined with different names but in files in different directories but with the same filename, the linker generates a multiply defined error message for the objects. ------------------------------------------------------------------------------ FIXED SDSCM00041961 ------------------------------------------------------------------------------ Summary : C6x codegen generates incorrect DWARF info for signed long bitfield. Fixed in : 7.3.2 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: This bug only happens when there is a bitfield defined with a 40 bit integral type. It will cause wrong debug information. Nothing else. ------------------------------------------------------------------------------ FIXED SDSCM00042028 ------------------------------------------------------------------------------ Summary : Assembly listing file output doesn't agree with .map file output. Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Absolute Lister Description: When compressor is used with C6600 (the default), the absolute listing files will not reflect the compressed addresses, but will instead show the original uncompressed instruction addresses. ------------------------------------------------------------------------------ FIXED SDSCM00042045 ------------------------------------------------------------------------------ Summary : Two-dimensional arrays of pointers may lead to optimiser abort Fixed in : 7.3.2 Severity : S1 - Critical / PS Affected Component : Optimizer Description: Certain cases of two-dimensional arrays, possibly only those containing pointers, may cause an optimiser abort. The case observed involves a 2-by-N array of pointers, and a loop in which *array[0][i], *array[1][i], *(array[0][i]+1), and *(array[1][i]+1) were all written. ------------------------------------------------------------------------------ FIXED SDSCM00042061 ------------------------------------------------------------------------------ Summary : Library building fails when TEMP is moderately long (50+ characters) Fixed in : 7.3.2 Severity : S1 - Critical / PS Affected Component : Runtime Support Libraries (RTS) Description: The ar6x command line is over 32k characters, which runs afoul of the insurmountable upper limit of the Win32 API CreateProcess. ------------------------------------------------------------------------------ FIXED SDSCM00042073 ------------------------------------------------------------------------------ Summary : Missing dependence causes invalid instruction schedule Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Optimizer Description: A part of alias analysis that attempt to disambiguate arrays from non-arrays can be faked out by a pointer to a struct that is incremented (a la *p++) within a loop. The incremented pointer is assumed to always point to an array, which therefore can't alias an access to a non-array. ------------------------------------------------------------------------------ FIXED SDSCM00042088 ------------------------------------------------------------------------------ Summary : Use of unordered operator causes errors for that section in the XML map file Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Linker ------------------------------------------------------------------------------ FIXED SDSCM00042132 ------------------------------------------------------------------------------ Summary : Code moved before NULL pointer check in 'if' statement Fixed in : 7.3.2 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Given a sequence like pqd = ((pq)->dynamic); if ( (((pqd)==0) ? pq->queue[0] pq->queue[pqd->head]) == qent ) the compiler may arrange to dereference pqd->head before it has tested that pqd is non-NULL, causing incorrect behavior if the processor traps on the bad access. ------------------------------------------------------------------------------ FIXED SDSCM00042146 ------------------------------------------------------------------------------ Summary : Quotes in PATH, TEMP, etc on Windows breaks mklib Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Runtime Support Libraries (RTS) Description: If the PATH environment variable has quotes in it, mklib will crash with a mysterious error like "CreateProcess(NULL, cl6x atexit.c ...) failed. The system cannot find the file specified." It is not legal to have literal quotes in PATH, but as an enhancement, mklib will attempt to remove quotes from PATH and try again. ------------------------------------------------------------------------------ FIXED SDSCM00042149 ------------------------------------------------------------------------------ Summary : Signed bitfield in union with unsigned integer treated as unsigned Fixed in : 7.3.2 Severity : S1 - Critical / PS Affected Component : C/C++ Compiler (cl) Description: Given a union containing a scalar integer field and a struct field consisting entirely of bitfields, such that the integer and the bitfield struct have the same number of bits, a signed bitfield may be treated (incorrectly) as unsigned if the scalar integer is unsigned. ------------------------------------------------------------------------------ FIXED SDSCM00042166 ------------------------------------------------------------------------------ Summary : adjacent bit field in a structure got overwritten by writing to another bit field Fixed in : 7.3.2 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: This bug happens when bit field bit width is between 32 and 40. The codegen will try to access it with a long data type which has 64 bit memory space. It might over write its neighbouring field. ------------------------------------------------------------------------------ FIXED SDSCM00042199 ------------------------------------------------------------------------------ Summary : Compiler generates unexpected memset call in derived class constructor (affects performance) Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Parser Description: In some circumstances, the compiler is needlessly generating a call to memset for some C++ constructor calls when compiling with --abi=eabi (ELF mode). This can inhibit the inlining of simple constructors. ------------------------------------------------------------------------------ FIXED SDSCM00042217 ------------------------------------------------------------------------------ Summary : Compiler may miss alias involving union within struct Fixed in : 7.3.2 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: The compiler may miss an alias involving references to a union within a struct, as in a read from p->u.a followed by a write to p->u.b, where u is a union and a and b are its fields, and a and b are of incompatible types. ------------------------------------------------------------------------------ FIXED SDSCM00042309 ------------------------------------------------------------------------------ Summary : v7.3 compiler doesn't generate string literals in the .const.string section and this breaks compatibility Fixed in : 7.3.2 Severity : S2 - Major Affected Component : Code Generator Description: The .const.string section will now be generated in non-PIC mode. ------------------------------------------------------------------------------ FIXED SDSCM00042340 ------------------------------------------------------------------------------ Summary : Compiler mistakenly issues diagnostic about destructor for base class is not virtual Fixed in : 7.3.2 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: The no virtual base class destructor diagnostic will no longer be emitted when the base class has a virtual destructor. ------------------------------------------------------------------------------ 17. 7.3.1 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00040151 ------------------------------------------------------------------------------ Summary : Getting compile time generated symbol re-definition error during linking C674x ELF target Fixed in : 7.3.1 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: The linker may generate "duplicate symbol" errors for symbols named like _TI_DW_.debug_info. when linking object files. Using ofd, it can be seen that these symbols are signatures for COMDAT groups. This is an error in COMDAT generation in the assembler and linker. ------------------------------------------------------------------------------ FIXED SDSCM00040319 ------------------------------------------------------------------------------ Summary : OFD crashes while printing debug info from relocatable file Fixed in : 7.3.1 Severity : S2 - Major Affected Component : OFD Utility ------------------------------------------------------------------------------ FIXED SDSCM00040376 ------------------------------------------------------------------------------ Summary : Assignment to 2D-array, which has more than 20 items, resulted in INTERNAL ERROR. Fixed in : 7.3.1 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: A loop that only writes long constants to a long integer array causes an internal compiler error. ------------------------------------------------------------------------------ FIXED SDSCM00040400 ------------------------------------------------------------------------------ Summary : Bitfield alias may be missed when struct is smaller than field type Fixed in : 7.3.1 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: An alias may be missed, and incorrect answers result, when a struct contains a bitfield and the struct's total size is smaller than the size of the bitfield's type. Eg, a field like "int x6" -- the bitfield is 6 bits but int is 16 or 32. Making both direct and indirect accesses to the same field may be an additional requirement to exhibit this problem. ------------------------------------------------------------------------------ FIXED SDSCM00040497 ------------------------------------------------------------------------------ Summary : DSECT failure Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Linker Description: In some cases, code allocated to a DSECT type output section may be included in the output file. This is known to occur if the code in the DSECT references a function that is not allocated to a DSECT. ------------------------------------------------------------------------------ FIXED SDSCM00040622 ------------------------------------------------------------------------------ Summary : Compiler may miss alias of struct returned from call if contains bitfield and fits in int Fixed in : 7.3.1 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: The compiler may convert local struct variables of struct type into simple ints, if the struct is small enough and all fields are bitfields. If such a converted struct is also returned from a function call, the compiler may miss an alias between the returned-value struct and the local struct. ------------------------------------------------------------------------------ FIXED SDSCM00040626 ------------------------------------------------------------------------------ Summary : If it gets the struct that has bit field member that is return value of function, the correct value can not refer. Fixed in : 7.3.1 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: There were two stores to the structure 1) Setting bitfields to 1 2) Setting bitfields to 2 The bug caused the stores to be switched around, causing the store of 1's to happen after the store of 2's, leading to the incorrect final value. ------------------------------------------------------------------------------ FIXED SDSCM00040650 ------------------------------------------------------------------------------ Summary : Error when specifying 400 or more to precision of output format specifier Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: The minimum max conversion (precision) printf size to be C89 compliant is 509. The conversion size is now C89 compliant. ------------------------------------------------------------------------------ FIXED SDSCM00040657 ------------------------------------------------------------------------------ Summary : After the initialized array is used to assign into other variable in loop, when it is used the assigned variable, the value o Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Optimizer Description: An initialized local array variable inside a loop was incorrectly setup. ------------------------------------------------------------------------------ FIXED SDSCM00040658 ------------------------------------------------------------------------------ Summary : Taking the address of a static local variable may lead to a missed alias Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Optimizer Description: Accessing a static local variable both directly and indirectly, by taking its address, may miss an alias and produce incorrect behavior. ------------------------------------------------------------------------------ FIXED SDSCM00040665 ------------------------------------------------------------------------------ Summary : Anonymous function call that can resolve to direct pure call may cause compiler crash Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Optimizer Description: If an anonymous function call -- a call using a pointer-to-function variable rather than a direct function name -- can be resolved to a direct call to a known function with no side effects, in some cases the compiler may crash. ------------------------------------------------------------------------------ FIXED SDSCM00040691 ------------------------------------------------------------------------------ Summary : Video codec performance degraded when cgtools migrated to 7.2.4 Fixed in : 7.3.1 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: A loop which chooses between faster and safer versions at run time based on a pointer comparison may not derive all the benefit from the comparison in the faster case. ------------------------------------------------------------------------------ FIXED SDSCM00040777 ------------------------------------------------------------------------------ Summary : INTERNAL ERROR occurs. Usage of array variable of "unsigned long" type. Fixed in : 7.3.1 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) ------------------------------------------------------------------------------ FIXED SDSCM00040791 ------------------------------------------------------------------------------ Summary : A loop whose initial value has a side effect may compile incorrectly Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Optimizer Description: A loop like for (j = --i; j > 0; j >>= 1) may iterate the wrong number of times. The key detail is that j's initial value is --i, which also updates i. The problem has only been seen in loops that iterate by >>=, but it could possibly affect other loops. ------------------------------------------------------------------------------ FIXED SDSCM00040793 ------------------------------------------------------------------------------ Summary : Accessing the same variable both directly and via pointer-to-void may miss the alias Fixed in : 7.3.1 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: If the same variable is referred to both directly and via a pointer-to-void parameter, the compiler may not detect that both accesses are to the same variable. ------------------------------------------------------------------------------ FIXED SDSCM00040908 ------------------------------------------------------------------------------ Summary : Hex converter crashes with segmentation fault Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Hex Converter (hex) Description: Hex converter crashes with segmentation fault if more than 15 --exclude options are used. ------------------------------------------------------------------------------ FIXED SDSCM00041130 ------------------------------------------------------------------------------ Summary : Complicated nested IFs may access memory in wrong order Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Optimizer Description: Given two sufficiently complicated memory accesses inside the predicates of nested IFs -- typically indexed accesses to part of a struct -- the compiler may reorder the accesses inappropriately. The effect is that the inner access, or one dependent on the inner IF, may happen when it should have been disallowed. The consequence may be a faulting access on targets that check for such things; targets that don't check won't see any problem, because the incorrect access will be discarded. ------------------------------------------------------------------------------ FIXED SDSCM00041166 ------------------------------------------------------------------------------ Summary : C++ static consts are not optimized away and have space reserved in .bss Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Code Generator Description: The parser now removes unreferenced static const variables. ------------------------------------------------------------------------------ FIXED SDSCM00041224 ------------------------------------------------------------------------------ Summary : Compiler generating illegal cross path read in software pipelined loop Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Code Generator Description: There is no easy correlation between the C source code and the trigger codntions of this bug. However, it usually happens when there is a vector register spill. When this bug happens, the compiler quits. The user can not get the object file and the assembler will emit an error message. ------------------------------------------------------------------------------ FIXED SDSCM00041264 ------------------------------------------------------------------------------ Summary : Optimiser may combine _mpy and _mpyh into _mpy2ll incorrectly given -me Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Optimizer Description: The compiler may combine _mpy and _mpyh of the same operands into _mpy2ll and then extract from the result. With -me, the operations are combined in the wrong order. ------------------------------------------------------------------------------ FIXED SDSCM00041312 ------------------------------------------------------------------------------ Summary : Register allocation in Software Pipelining is wrong because of errors in conflict graph Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Code Generator Description: Register allocation is wrong in the kernel of a software pipeline loop. The reason is that the conflict graph built for this kernel does not cover all the references. In this case, one of the def of a register falls just one cycle following the kernel. The conflict graph builder wrongly thinks this def does not belong to the kernel. The fix corrects this error. ------------------------------------------------------------------------------ FIXED SDSCM00041384 ------------------------------------------------------------------------------ Summary : cg6x3 internal error on CMPxx instruction with reg-pair operand Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Code Generator Description: This defect can only occur when compiling with -mvtesla. The compiler will produce an error and stop if a linear assembly source file has a CMPGT, CMPLT, CMPGTU, or CMPLTU instruction with a register pair source operand. ------------------------------------------------------------------------------ FIXED SDSCM00041395 ------------------------------------------------------------------------------ Summary : scanf %1f should stop after one character Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: The scanf format %1f should stop after one character of input, but it ignores the field width and keeps parsing as long as the input looks like a floating-point number. ------------------------------------------------------------------------------ FIXED SDSCM00041396 ------------------------------------------------------------------------------ Summary : sscanf(" ", "%s", arg) should not modify arg Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: When the scanf format %s is used, if there are no non-whitespace characters in the input, the conversion should fail and should not modify the argument. ------------------------------------------------------------------------------ FIXED SDSCM00041397 ------------------------------------------------------------------------------ Summary : scanf %4[..] consumes 5 characters Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: With a format string containing a %[ conversion specifier with field width, and input containing a sequence of characters that matches the scanset and has more characters than the field width, a call to vfscanf shall assign the number of characters equal to the field width to the corresponding pointer to character array leaving characters after the input item unread. 7.19.6.9;2a (161) The bug here is that, while _scanfi assigns the correct number of characters, it fails to unget the following character, which belongs to the next conversion. ------------------------------------------------------------------------------ FIXED SDSCM00041398 ------------------------------------------------------------------------------ Summary : scanf %[..] matching failure should return immediately Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: When a conversion fails, scanf should return immediately. In these test cases, scanf erroneously keeps going. scanf eventually reports a return value that is too large. ------------------------------------------------------------------------------ FIXED SDSCM00041442 ------------------------------------------------------------------------------ Summary : printf("%#.4o",345) adds too many zeros Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: When using the # printf format flag, printf should only add an extra "0" at the beginning of the number if it isn't already "0". ------------------------------------------------------------------------------ FIXED SDSCM00041447 ------------------------------------------------------------------------------ Summary : printf("%#.0o",0) fails to write "0" Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: For *printf functions, the C standard requires that if the value is 0, the precision is 0, and the # flag is used, a single "0" will be printed. ------------------------------------------------------------------------------ FIXED SDSCM00041470 ------------------------------------------------------------------------------ Summary : cmp6x takes more than 1 hour during template instantiation Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Compressor (cmp) Description: The C6000 compressor (cmp6x) had a bug in a function intended to cache code labels. This would slow down processing of long code sections. The longer the section, the exponentially worse the slowdown would be. For a code section with over 200,000 instructions, the compressor could run for more than an hour. This is made worse by using C++ templates in COFF mode, which uses late template instantiation, which means the compressor will run over and over while compressing templates, which can get to be very large. ------------------------------------------------------------------------------ FIXED SDSCM00041550 ------------------------------------------------------------------------------ Summary : sscanf %% failure not handled correctly Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: scanf fails in these ways when the %% conversion specifier fails When any sort of error occurs with %%, scanf immediately returns EOF. It should instead return EOF only if there were 0 previous successful conversions and there was an input failure. If the failure was either a matching failure, or there were any previous successful conversions, it should return the number of previous successful conversions. When the failure is a matching failure, scanf should unget the character that didn't match. It fails to do so. ------------------------------------------------------------------------------ FIXED SDSCM00041551 ------------------------------------------------------------------------------ Summary : scanf %d and %f should immediately return upon input failure, even if ordinary characters were matched Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: scanf should immediately return when an input failure occurs, even if ordinary characters in the format were already successfully matched. This bug affects all of the integer and float conversions. ------------------------------------------------------------------------------ FIXED SDSCM00041552 ------------------------------------------------------------------------------ Summary : sscanf.c _chkmbc should return EOF on input failure Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: It should be possible for sscanf to return EOF on a string if an input error occurs (the end of the input string is reached before the format string is exhausted), but it does not return EOF as appropriate. ------------------------------------------------------------------------------ FIXED SDSCM00041553 ------------------------------------------------------------------------------ Summary : scanf input failure when looking for ordinary characters always returns EOF Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: When matching ordinary characters in the format string, if there is an input failure, scanf should return EOF only if there were no previous successful conversions. If there were any, it should return the number of previous successful conversions. ------------------------------------------------------------------------------ FIXED SDSCM00041554 ------------------------------------------------------------------------------ Summary : scanf %e and %[ should not return EOF on matching failure Fixed in : 7.3.1 Severity : S3 - Minor Affected Component : Runtime Support Libraries (RTS) Description: When using %f (or other floating-point conversion specifier) or %[, if a matching failure occurs before even one character is matched, scanf will return EOF instead of 0 as the standard requires. ------------------------------------------------------------------------------ FIXED SDSCM00041786 ------------------------------------------------------------------------------ Summary : Certain oversized vectorisation cases for c66p cause optimiser crash Fixed in : 7.3.1 Severity : S2 - Major Affected Component : Optimizer Description: Certain very wide vectorisation cases (so far only for c66p) may cause an optimiser crash. Loops involving operations with one short operand and one int operand may trigger the crash. Loops doing a saturated subtraction of shorts and saving the result in a short may trigger the crash. In both cases, an UNROLL pragma will work around the problem; ------------------------------------------------------------------------------ 18. 7.3.0 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00031246 ------------------------------------------------------------------------------ Summary : Zero length Section allocation problem Fixed in : 7.3.0 Severity : S3 - Minor Affected Component : Linker Description: A zero length output section in a linker command file that contains the dot expression . += 0x0 will cause a linker error .trace fill = 0x0 { _SYS_PUTCBEG = .; . += 0x0; _SYS_PUTCEND = . - 1; } > L1SARAM PAGE 1 placement fails for object ".trace", size 0x0 (page 1). Available ranges L1SARAM size 0x1000 unused 0x22e max hole 0x22c error errors encountered during linking; ------------------------------------------------------------------------------ FIXED SDSCM00040365 ------------------------------------------------------------------------------ Summary : Mixing direct and indirect accesses to same variable may give wrong answer Fixed in : 7.3.0 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Referring to the same variable both directly and indirectly -- eg, given p[0]=&a, using both *p[0] and a in the same function -- may produce the wrong answer when the alias between the two references is missed. ------------------------------------------------------------------------------ FIXED SDSCM00040369 ------------------------------------------------------------------------------ Summary : Assignment to local struct variable with recurrence may assign some fields incorrectly Fixed in : 7.3.0 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Given a struct type that contains a pointer to the same type, as in struct st { struct st *next; int val; } and a local variable X of that type, and an assignment to that variable like X = *(X.next); some fields of X may not be written correctly. (Because X.next is written before the read of *(X.next) has completed.) ------------------------------------------------------------------------------ FIXED SDSCM00040372 ------------------------------------------------------------------------------ Summary : Variable with volatile inside loop resulted in codegen INTERNAL ERROR. Fixed in : 7.3.0 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) ------------------------------------------------------------------------------ FIXED SDSCM00040459 ------------------------------------------------------------------------------ Summary : Division or modulo by most-negative-value of type may produce incorrect answer Fixed in : 7.3.0 Severity : S2 - Major Affected Component : Optimizer Description: Division or modulo when the divisor is the most-negative-value of a signed type (eg, -128 for signed-char for C6x) may produce the wrong answer. ------------------------------------------------------------------------------ FIXED SDSCM00040487 ------------------------------------------------------------------------------ Summary : packed attribute given before the member list of a CSU may produce bad code Fixed in : 7.3.0 Severity : S3 - Minor Affected Component : Parser Description: A class/union/struct type declared with the packed attribute preceding its member list can result in the generation of incorrect code. ------------------------------------------------------------------------------ FIXED SDSCM00040516 ------------------------------------------------------------------------------ Summary : Severe performance loss since 6.1.11 Fixed in : 7.3.0 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Two codegen optimizations were incorrectly disabled with the switch --opt_for_speed=5 during a previous bug fix. ------------------------------------------------------------------------------ FIXED SDSCM00040518 ------------------------------------------------------------------------------ Summary : Linker fails to impose alignment constraints of a segment's contents on the segment itself Fixed in : 7.3.0 Severity : S2 - Major Affected Component : ELF Linker ------------------------------------------------------------------------------ FIXED SDSCM00040623 ------------------------------------------------------------------------------ Summary : Mixing direct and indirect accesses to same variable may give wrong answer Fixed in : 7.3.0 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Referring to the same variable both directly and indirectly -- eg, given p=&a, using both *p and a in the same function -- may produce the wrong answer when the alias between the two references is missed. ------------------------------------------------------------------------------ FIXED SDSCM00040651 ------------------------------------------------------------------------------ Summary : Return statement with embedded assignment from a post-increment or -decrement may return wrong value Fixed in : 7.3.0 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: A statement like "return j = i++" may return the value of i after it has been incremented, when it should return the value before the increment. It's possible that other cases exist, but all will involve an assignment of a post-increment or post-decrement embedded in another statement. ------------------------------------------------------------------------------ FIXED SDSCM00040656 ------------------------------------------------------------------------------ Summary : An initialised local array, used in a loop, may be set up incorrectly Fixed in : 7.3.0 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: A local array variable that is initialised in its definition may be set up incorrectly if the array is used within a loop. ------------------------------------------------------------------------------ FIXED SDSCM00040659 ------------------------------------------------------------------------------ Summary : Mixing direct and indirect accesses to same variable may give wrong answer Fixed in : 7.3.0 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Referring to the same variable both directly and indirectly -- eg, given p=&a, using both *p and a in the same function -- may produce the wrong answer when the alias between the two references is missed. ------------------------------------------------------------------------------ FIXED SDSCM00040698 ------------------------------------------------------------------------------ Summary : Optimiser may crash if given loop nest in which innermost loop unconditionally returns Fixed in : 7.3.0 Severity : S2 - Major Affected Component : Optimizer Description: A loop nest with an inner loop that returns unconditionally may cause the optimiser to crash. ------------------------------------------------------------------------------ FIXED SDSCM00040730 ------------------------------------------------------------------------------ Summary : Optimizer terminates abnormally when vectorising _cmpyr1 Fixed in : 7.3.0 Severity : S2 - Major Affected Component : Optimizer Description: Optimiser will crash when vectorising _cmpyr1, because it fumbles an internal cast necessary to match the operands of the vector intrinsic, _dcmpyr1. Similar problems may exist with _maxu4 going to _dmaxu4 and _shru2 to _dshru2, but haven't been demonstrated. ------------------------------------------------------------------------------ FIXED SDSCM00040799 ------------------------------------------------------------------------------ Summary : C6000_PCR_L16 and C6000_PCR_H16 relocations have the wrong IDs Fixed in : 7.3.0 Severity : S3 - Minor Affected Component : Assembler ------------------------------------------------------------------------------ FIXED SDSCM00040837 ------------------------------------------------------------------------------ Summary : Static initialization of packed double field for a C6X target causes seg fault Fixed in : 7.3.0 Severity : S2 - Major Affected Component : Code Generator Description: For C6000 targets, static initialization of a packed double field will cause a segmentation fault in the assembly step (asm6x) of a compilation. For example the following code will cause the failure typedef struct ps { char c; double d; } __attribute__((packed)) PS; PS v = { 'a', 1.0 }; . ------------------------------------------------------------------------------ FIXED SDSCM00040870 ------------------------------------------------------------------------------ Summary : Compiler issues "invalid schedule generated" overly conservative non-fatal error Fixed in : 7.3.0 Severity : S2 - Major Affected Component : Code Generator Description: In rare cases, the compiler may give a non-fatal error, "Invalid instruction schedule generated". This error message is usually conservative, meaning that there is actually no problem with the object file that was generated by the compiler. This code that can emit this error message has been altered so that it will be generated less often on c67+ and c674x parts. ------------------------------------------------------------------------------ 19. 7.3.0B3 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00039238 ------------------------------------------------------------------------------ Summary : Accessing variable as both scalar and array may give wrong answers Fixed in : 7.3.0B3 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: Accessing a local integer as both a scalar and an array, as in uint64_t val = 0; uint8_t *dest = (uint8_t *)&val; for ( ii = 0; ii < sizeof( uint64_t ); ++ii ) *dest++ = *src++; return val; which reads and writes val as a uint64_t and also writes to it byte-by-byte as a uint8_t, may produce the wrong answer. ------------------------------------------------------------------------------ FIXED SDSCM00039691 ------------------------------------------------------------------------------ Summary : The PC range for the lexical block in the debug info is incorrect Fixed in : 7.3.0B3 Severity : S2 - Major Affected Component : Code Generator Description: The compiler under certain conditions generates incorrect debug information for local variables. ------------------------------------------------------------------------------ FIXED SDSCM00040176 ------------------------------------------------------------------------------ Summary : Memory accesses may occur out of order Fixed in : 7.3.0B3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: Consecutive memory accesses like x[i++] x[i-1] may occur out of order, if i is not a loop index variable (ie, either the accesses are not in a loop or the loop has a different index) and the code is software-pipelined. ------------------------------------------------------------------------------ FIXED SDSCM00040264 ------------------------------------------------------------------------------ Summary : optimizer reduces WRITE to volatile in a loop to a single WRITE to volatile after the loop Fixed in : 7.3.0B3 Severity : S2 - Major Affected Component : Optimizer Description: A volatile access may not be properly handled if the volatile qualifier is only present on the field in the definition of a struct, as opposed to the struct type as a whole or the variable itself. ------------------------------------------------------------------------------ FIXED SDSCM00040282 ------------------------------------------------------------------------------ Summary : Triangular loop nest may cause optimiser crash Fixed in : 7.3.0B3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: A loop nest like for (i = 0; i < 7; i++) for (j = 0; j <= i; j++) x += k; where the inner loop's trip count depends on the outer loop's iteration (this is called a triangular loop nest) and the inner loop's body contains an increment of a variable that isn't a loop index, may cause the compiler to crash. ------------------------------------------------------------------------------ FIXED SDSCM00040355 ------------------------------------------------------------------------------ Summary : Assembler fails to generate a relocation for a call to an imported function Fixed in : 7.3.0B3 Severity : S2 - Major Affected Component : Assembler ------------------------------------------------------------------------------ FIXED SDSCM00040377 ------------------------------------------------------------------------------ Summary : va_end() at left operand of operator, which is passed to return(), resulted in compilation error Fixed in : 7.3.0B3 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: The macro va_end should be legal in a void expression context such as the left hand operand of the comma operator. This means the macro needs to expand to a void expression rather than be an empty macro. ------------------------------------------------------------------------------ 19. 7.3.0B2 Fixed Code Generation Tools Defects ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ FIXED SDSCM00039422 ------------------------------------------------------------------------------ Summary : The intrinsic _ito128 is not handled properly Fixed in : 7.3.0B2 Severity : S3 - Minor Affected Component : C/C++ Compiler (cl) Description: The intrinsic _ito128 is not handled properly when optimization is enabled. This bug can be triggered when there is a paired register move, and the source register and the destination register are overlapped. The end result is one of the source register's content is propagated to several other destination registers. ------------------------------------------------------------------------------ FIXED SDSCM00039960 ------------------------------------------------------------------------------ Summary : Memory accesses may occur out of order in irreducible control-flow graph Fixed in : 7.3.0B2 Severity : S2 - Major Affected Component : C/C++ Compiler (cl) Description: The problem appears to be the combination of a non-indexed memory access in a loop -- p->x as opposed to x[i] -- and an irreducible control-flow graph. The non-indexed memory access has a data dependence across iterations in both directions; the write must come after the current iteration's read, and it must also come before the next iteration's read. We get the write-after-read dependence but don't produce the read-after-write. Whether that causes a problem depends strongly on context. Only inner loops are pipelined, so outer-loop situations are probably safe. The inner loop has to pipeline in a particular way, so some will work and some won't. ------------------------------------------------------------------------------ FIXED SDSCM00039973 ------------------------------------------------------------------------------ Summary : DCMPY or DCCMPY instrs incorrectly scheduled to write to M unit at same time as 2-cycle multiply instruction Fixed in : 7.3.0B2 Severity : S2 - Major Affected Component : Code Generator Description: In certain cases, the compiler may schedule code that causes a write port conflict on C6600 devices. In this particular case, the compiler may schedule the DCMPY or DCCMPY instruction such that a 2-cycle multiply instruction is trying to write to the register file at the same time. Since, on C6600, there are only two 64-bit write buses to the register file, one write will not be successful. ------------------------------------------------------------------------------ FIXED SDSCM00039981 ------------------------------------------------------------------------------ Summary : Compiler incorrectly generating LDDW when it should be generating LDNDW from a _mem8 Fixed in : 7.3.0B2 Severity : S2 - Major Affected Component : Optimizer Description: An unaligned access in a loop may be incorrectly vectorised in a way that creates an aligned access. So far this has only been observed for _mem8 and c66; it's theoretically possible also for _mem4, and for c674, c64p, and c64, but we haven't been able to create an example. ------------------------------------------------------------------------------ 20. Current Known Issues ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00040934 ------------------------------------------------------------------------------ Summary : Structure is not initialized correctly when using -o2 or -o3 optimization Affected Component : Optimizer Description: There is a problem with the initialization of a structure using symbols generated in the linker command file. ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00041433 ------------------------------------------------------------------------------ Summary : Linker fails to automatically GROUP DP-related data sections under EABI Affected Component : ELF Linker Description: The ELF linker is not automatically generating the Group section for the .bss, .neardata, and .fardata sections. It would be expected that there would at least be a warning. ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00042130 ------------------------------------------------------------------------------ Summary : C66x Codegen out of memory error Affected Component : C/C++ Compiler (cl) ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00042734 ------------------------------------------------------------------------------ Summary : C66x CGT compiler/optimizer issue regarding ANDN instruction Affected Component : C/C++ Compiler (cl) Description: For some reason C66x compiler is not converting native C "a & ~b" (where a and b are long long) into single ANDN instructions but instead selects two 32-bit NOT instruction followed by 64-bit AND instruction in the attached test case. This results in performance degradation due to increase in the bound and therefore the iteration interval. ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00042923 ------------------------------------------------------------------------------ Summary : Should never report overflow for R_C6000_PREL31 Affected Component : Linker Description: If .c6xabi.exidx and .c6xabi.extab are allocated sufficiently far from a .text section, the linker can report overflow for R_C6000_PREL31, but it really shouldn't. Even though it is a signed relocation, it can't really overflow. ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00043586 ------------------------------------------------------------------------------ Summary : Add prototypes to c6x.h for _enable_interrupts, _disable_interrupts, _restore_interrupts Affected Component : Runtime Intrinsics Description: All other intrinsics have a prototype in c6x.h. Please add prototypes for these intrinsics. ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00043622 ------------------------------------------------------------------------------ Summary : Use of align directive causes the .out file to be much larger, but affects nothing else. Affected Component : ELF Linker ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00044199 ------------------------------------------------------------------------------ Summary : Linker removes sections that were included in link in previous versions Affected Component : Linker Description: The v7.3.x linker removes certain sections that were previously being included with 6.0.x linker. Those sections can still be retained with the –u linker option but it is not clear why the new linker removing those sections to begin with. ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00044306 ------------------------------------------------------------------------------ Summary : wrong argument in generating _amem8_f2 intrinsic function if the argument has post increament Affected Component : Parser ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00044422 ------------------------------------------------------------------------------ Summary : Source file takes about 5 minutes to compile and when canceled generates a fatal internal fault Affected Component : C/C++ Compiler (cl) Description: The attached source file takes about 5 minutes to compile with -o2, and when build is canceled it generates a fatal internal fault INTERNAL ERROR cg6x experienced a fatal internal fault while processing function DRC_TI_applyGain6 file drc_int.c line 3607 This is a serious problem. Please contact Customer Support with this message and a copy of the input file and help us to continue to make the tools more robust. With -o1 no issue is observed. ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00044670 ------------------------------------------------------------------------------ Summary : Dwarf call information for CALLRET instruction does not include the name of the function called Affected Component : C/C++ Compiler (cl) Description: The Dwarf debug information for a CALLRET instruction does not include the name of the function called. The DW_AT_name attribute is not present. This error causes problems for the cg_xml script call_graph.pl. One, it appears a function is being called indirectly. Two, a normal direct function call is not recorded. ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00045072 ------------------------------------------------------------------------------ Summary : Compiler takes a long time to compile one C++ source file Affected Component : C/C++ Compiler (cl) ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00045110 ------------------------------------------------------------------------------ Summary : Prototypes in c6x.h for complex_mpysp and complex_conjugate_mpysp should use __float2_t instead of double Affected Component : Runtime Intrinsics Description: In c6x.h the prototypes for these intrinsics currently are ... double _complex_mpysp (double, double); /* CMPYSP then DADDSP */ double _complex_conjugate_mpysp (double, double); /* CMPYSP then DSUBSP */ They should be ... __float2_t _complex_mpysp (__float2_t, __float2_t); /* CMPYSP then DADDSP */ __float2_t _complex_conjugate_mpysp (__float2_t, __float2_t); /* CMPYSP then DSUBSP */ ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00045205 ------------------------------------------------------------------------------ Summary : strip6x cannot handle very long filenames Affected Component : Strip Utility ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00045417 ------------------------------------------------------------------------------ Summary : bool and _Bool are not defined correctly Affected Component : C/C++ Compiler (cl) Description: The C++ type "bool" and the C99 type "_Bool" should have the same type, but in the TI toolset they have different sizes, which means that C++ modules which use "bool" are not compatible with C modules which include stdbool.h and use "bool". ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00045452 ------------------------------------------------------------------------------ Summary : Compiler misreports MISRA warning 17.6 Affected Component : C/C++ Compiler (cl) ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00045612 ------------------------------------------------------------------------------ Summary : internal error writing bytes exceeds its formatted size Affected Component : Linker ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00045723 ------------------------------------------------------------------------------ Summary : The option -order on the hex utility for C6000 devices (hex6x) does not follow other device families Affected Component : Hex Converter (hex) Description: The option -order in the hex6x utility accepts the values L or M to set endianess. However, in all the other device families this same option uses LS or MS as values. ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00046565 ------------------------------------------------------------------------------ Summary : quoted paths given in a command file for the hex utility produce an error message Affected Component : Hex Converter (hex) ------------------------------------------------------------------------------ KNOWN ISSUE SDSCM00046936 ------------------------------------------------------------------------------ Summary : Hex utility incorrectly skips over a section with a duplicate name Affected Component : Hex Converter (hex) Description: There can be duplicate section names in an ELF file (and possibly a COFF file). The hex converter uses the section name as if it were a unique key when looking up the section in the section table. For duplicate section names, it will emit a warning and fail to convert the section. This was originally reported as SDSCM00046084, but that defect has been re-purposed as a more targeted fix that will handle the user's original test case; the fix for SDSCM00046084 is to ignore zero-length sections. Handling duplicate section names, neither of which are empty, will require some redesign, and we want to make that a separate effort.