[Bug target/39386] New: different computation results for O1 and O0 executables
jxyang at cs dot utah dot edu
gcc-bugzilla@gcc.gnu.org
Thu Mar 5 21:17:00 GMT 2009
This is seen on the version of avr-gcc 4.3.3 that gets built by the script that
comes with FemtoOS 0.88.
The program performs simple arithmatic and logical operations on a global
variable, and store the result in register R30:R31.
If the program is compiled with "avr-gcc -mmcu=atmega128 -O0", the final result
is 00. On the other hand, if the program is compiled with "avr-gcc
-mmcu=atmega128 -O1", the final result is 0xFF. Compiling at O2 gives me 0xFF
too.
Obviously, avr-gcc compiled the program wrong at one of the these optimization
levels.
This bug is observed in avr studio 4.15.
--
Summary: different computation results for O1 and O0 executables
Product: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jxyang at cs dot utah dot edu
GCC build triplet: --target=avr --with-gnu-ld --with-gnu-as --enable-
languages=c,c+
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39386
More information about the Gcc-bugs
mailing list