This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
This bug is seen using the avr-gcc that is built using the script that comes with FemtoOS 0.88. Compile the attached program like this: avr-gcc -O -mmcu=atmega128 small.c -S It can be seen that func_45() unconditionally loads from volatile g_54. That is wrong, since in the C code the load is protected by a test.
Created an attachment (id=17317) [edit] failure-inducing C program
Created an attachment (id=17318) [edit] asm displaying volatile bug
Please fill out GCC version this bug is reported against.
Fail on 4.3.2 with -O1, success with -O[023s].