CODEGEN-5387 |
Loop with early exit may peel incorrectly when unrolling (as with -mf3 or above) |
Fixed |
ARM_18.1.0.LTS, ARM_18.9.0.STS |
ARM_18.12.0.LTS, ARM_18.1.5.LTS* |
Add "#pragma UNROLL(1)" to the affected loop to inhibit unrolling, or compile with --opt_for_speed=2 or lower which inhibits unrolling of all loops. |
The compiler may unroll loops to speed them up. If it doesn't know the exact trip count, it needs to "peel" some iterations to make sure it does the extras if they don't fit exactly into the unrolled loop.
If the loop has an early exit -- in this case, it looks roughly like
while (flen-- && isdigit(*s)) ...
-- then there's a problem, because when the unrolled loop finishes, it could be because it's done, or it could be because isdigit(*s) returned false. If the unrolled part is done, we need to do the peeled part, but if isdigit() returned false, we don't, and the logic isn't ready for that conundrum and does the wrong thing. |
CODEGEN-5127 |
Linker fails with INTERNAL ERROR: no match for COMMA |
Fixed |
ARM_18.1.0.LTS, ARM_18.9.0.STS |
ARM_18.12.0.LTS, ARM_18.1.4.LTS |
Compile with --opt_level=3, or ensure that all constituent files are either compiled with --neon or without --neon. |
Combining object files compiled with --neon and without --neon in a --opt_level=4 final compilation, even if they're all compiled with -mv7a8, can cause a compiler abort. |
CODEGEN-5033 |
Functions in <string> incorrectly return NULL |
Fixed |
ARM_18.1.0.LTS, ARM_18.9.0.STS |
ARM_18.9.0.STS, ARM_18.1.4.LTS |
Ignore or suppress the warning. |
char_traits<char>::find() and char_traits<wchar_t>::find() return char* and wchar_t*, respectively. In our __string file (included by <string>), they are written to return NULL, which is (void*)0 and not the same type as the declaration, thus producing a warning. We have updated the file to make them return 0, which fixes the warnings. |
CODEGEN-5032 |
Loop over array, preceded by shuffle of the array using scalar temp repeatedly, may produce incorrect results |
Fixed |
ARM_18.1.0.LTS, ARM_18.9.0.STS |
ARM_18.12.0.LTS, ARM_18.1.5.LTS* |
The test case uses the same temp, nTemp, repeatedly in the shuffle function. Using different temps for each assignment will avoid the problem. Using "#pragma UNROLL(1)" to inhibit unrolling of the affected loops may also avoid the problem. |
The problem case looks something like
x = a[0]
a[1] = x
x = a[2]
a[3] = x
for (i = 0; i < N; i++) {
a[i] = ...
... a[i] ...
}
It shuffles data in an array a[] using the scalar x, then loops over array a[]. This particular arrangement, with the right optimisations, will do the wrong thing with the shuffle code. The wrong thing is part of optimising the loop, so both parts are required for there to be a problem. A workaround is to use a separate scalar variable for each assignment in the shuffle, ie, "x1 = a[0]; a[1] = x1" and "x2 = a[2]; a[3] = x2". |
CODEGEN-4912 |
Including stddef.h may disable MISRA diagnostics |
Fixed |
ARM_18.1.0.LTS, ARM_18.9.0.STS |
ARM_18.9.0.STS, ARM_18.1.4.LTS |
Add "#pragma diag_pop" after the inclusion of these files. SInce they're sometimes included from other system include files, it may take some digging to realise that this is necessary. |
Two include files -- stddef.h and string.h -- each lacked one diag_pop pragma to match the diag_push pragma, which meant that including those files would inadvertently disable certain MISRA warnings. |
CODEGEN-4885 |
See MISRA diagnostics when compiling stdio.h |
Fixed |
ARM_18.1.0.LTS, ARM_18.9.0.STS, ARM_18.12.0.LTS |
ARM_18.12.0.LTS, ARM_18.1.5.LTS* |
none |
A program that includes <stdio.h> and checks for MISRA warnings may see some from stdio.h itself, which should not happen. |
CODEGEN-4668 |
Macro with temp label causes assembler to crash |
Fixed |
ARM_18.1.0.LTS, ARM_18.12.0.LTS |
ARM_18.9.0.STS, ARM_18.1.3.LTS |
The problem will not occur without macro labels. If labels are required, no workaround is known. |
The assembler may crash or report a memory misuse when using an assembly macro containing a label, if the label appears in an instruction in a position that requires extra lookahead to parse.
The original example is a register name followed by a comma and a label use; for that assembler, the thing following the comma might be a shift specifier, so it requires expanding the macro label. That extra step frees some memory that it shouldn't, causing the problem. |
CODEGEN-4638 |
When shift counts are higher than 32, compiler sometimes optimizes to an incorrect shift count |
Fixed |
ARM_18.1.0.LTS, ARM_18.9.0.STS |
ARM_18.9.0.STS, ARM_18.1.2.LTS |
Turn off optimization by using optimization level off.
Otherwise, avoid a left-shift by a constant as an operand of the listed operations. However, compiler optimizations could interfere with this. Try keeping the shift count in a global variable instead of as a literal, or computing the shift separately into a variable (a global or volatile local) and doing the |, +, etc, on the variable. |
Left shifts by 32 or more, as an operand of +, -, &, |, or ^, (eg, ((X<<56) | (Y<<48))) may produce incorrect results. |
CODEGEN-4621 |
Remove COFF global linker symbols from documentation for ELF-only targets |
Fixed |
ARM_18.1.1.LTS |
ARM_18.9.0.STS |
|
|
CODEGEN-4600 |
Warning when using pragma RETAIN with attribute((noinit)) |
Fixed |
ARM_18.1.0.LTS, ARM_18.9.0.STS |
ARM_18.9.0.STS, ARM_18.1.3.LTS |
|
When using pragma RETAIN with attribute((noinit)) on the same symbol for an EABI target, a .clink directive is erroneously emitted in the assembly file, leading to a warning that the .CLINK directive is being ignored because the symbol already has .RETAIN specified. |
CODEGEN-4525 |
Unreachable code in linear assembly may lead to crash |
Fixed |
ARM_18.1.0.LTS, ARM_18.9.0.STS |
ARM_18.9.0.STS, ARM_18.1.3.LTS |
Remove the unreachable code before compiling, or compile with -o1, -o0, or -ooff, or use --symdebug:none which happens to avoid the problem. |
The compiler may crash if given a linear assembly file containing some code that has a label but is not reachable. It's theoretically possible to create the same problem with C/C++ code, but we haven't been able to do it and the risk is quite small. |
CODEGEN-4303 |
Abort on using decltype(auto) to declare a type conversion operator |
Fixed |
ARM_18.1.0.LTS |
ARM_18.9.0.STS |
|
|
CODEGEN-4274 |
Various standard classes inherit from std::binary_function when they shouldn't |
Fixed |
ARM_18.1.0.LTS |
ARM_18.9.0.STS |
|
According to the synopses of headers in C++14, many classes which do not inherit from std::binary_function do inherit from it as an implementation decision.
A sample list are object of the following similar object types:
* std::map::value_compare and std::multimap::value_compare
* std::plus
* std::owner_less |
CODEGEN-4033 |
std::binomial_distribution references undefined function lgamma_r |
Fixed |
ARM_18.1.0.LTS |
ARM_18.9.0.STS |
|
Instantiations of std::binomial_distribution fail to link due to the undefined symbol lgamma_r.
This is a C11 function which is not provided by the TI C library. |
CODEGEN-4020 |
Auto thread_local variable is causing a reference to __cxa_thread_atexit |
Fixed |
ARM_18.1.0.LTS |
ARM_18.9.0.STS |
|
The thread_local specifier, when applied to variables, should currently be ignored because we only support single-threaded environments.
However, a global variable with the thread_local specifier, if requiring dynamic initialization, will cause a reference to the standard ABI function __cxa_thread_atexit that can't be resolved by the linker. |
CODEGEN-3915 |
_Pragma doesn't support raw string arguments |
Fixed |
ARM_18.1.0.LTS |
ARM_18.9.0.STS |
|
|
CODEGEN-3595 |
Stack usage under reports stack amount used because it fails to handle function aliases |
Fixed |
ARM_18.1.0.LTS |
ARM_18.9.0.STS, ARM_18.1.2.LTS |
|
CCS Stack Assistant did not accurately track aliased functions-- functions whose definitions are represented by a different symbol name. Now, the alias function will be used to determine stack size correctly, and the aliased function call name will be replaced with its alias. Currently, the Stack Assistant GUI is not capable of showing both the aliased and alias function names for calls to aliased functions-- this will require a future update. |
SDSCM00014430 |
calloc doesn't check arguments to make sure the requested size is reasonable |
Fixed |
ARM_18.1.0.LTS |
ARM_18.9.0.STS |
|
|