Some level of -O2 is breaking my application. I think this is a known
bug, but I am trying to find which specific option is breaking things so
I can still optimize as much as possible. I am attaching the file I want
to compile.
avr-gcc -mmcu=atmega128 -O -fdollars-in-identifiers file.c
Compiles just fine, but
avr-gcc -mmcu=atmega128 -O2 -fdollars-in-identifiers file.c
does not. Also
avr-gcc -mmcu=atmega128 -O -fdollars-in-identifiers -fthread-jumps
-fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps
-fcse-skip-blocks -fgcse -fgcse-lm -fexpensive-optimizations
-frerun-cse-after-loop -fcaller-saves -fpeephole2 -fschedule-insns
-fschedule-insns2 -fsched-interblock -fsched-spec -fregmove
-fstrict-aliasing -fdelete-null-pointer-checks -freorder-blocks
-freorder-functions -falign-functions -falign-jumps -falign-loops
-falign-labels file.c
compiles fine as well, which is strange because I manually add to -O all
the options to make it -O2.
The error I get (for the -O2 compilation) is:
file.c: In function `TrickleTimerImplP$0$adjustTimer':
file.c:32409: error: unable to find a register to spill in class
`BASE_POINTER_REGS'
I would just like to isolate the optimization option that is triggering
the bug, but apparently I am missing something. I got my optimization
list from http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
Any thoughts/comments would be appreciated. Thanks.
Nathan