-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-14903
-
-
-
-
default
-
Avoid using statement expressions in for loops.
gnu statement expressions in for loops are incorrectly converted by the parser such that loop increment that occurs too early in loop code.
Building the test case with v21.6.1 tools moves the location of the loop increment code for the loop on line 3942 to the beginning of the loop, whereas with v21.6.0 and earlier, the increment happens later. This manifests in incorrect runtime behavior.
Build the attached test case
cl430 -@options.txt general_purpose_timer.c
Look at the corresponding assembly at line 204.
When building with v21.6.0, the loop structure is different.