------- Comment #3 from asche at primion dot de 2010-07-14 09:07 ------- Created an attachment (id=21198) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21198&action=view) see comment
What do you mean preprocessed? What I can offer is in the attachment - a standalone C file that you can compile with the option set -mthumb -mcpu=cortex-m3 -std=gnu99 -O<x> -c -g -pedantic -Wall -Wextra -Iinc -fshort-enums I built the file with <x> = 0, 2 and 3. The objects and screenshots from the generated assembly code in out IDE are included. Please let me know what else I can do to help you. The C source code contains a description of what the code does in real life, but that is really secondary; it is obvious that there are illegal optimizations performed - in =2 and =3 in this case, glbLoopCt is not assigned within the loop, only at the end; in our production case, the comparison is not done against glbDetectedEndRAM as required by the control flow but against the constant -1 which is also illegal and breaks the code. Thanks! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44928