avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Re: -O vs. -O2


From: Nathan Cooprider
Subject: [avr-gcc-list] Re: -O vs. -O2
Date: Thu, 26 Jul 2007 16:03:09 -0600
User-agent: Thunderbird 2.0.0.4 (X11/20070604)

Nuts. I hope my original posting of this bounces off the server and did not spam all your boxes. I didn't realize how big the source file was.

If the file was blocked (as I hope it was) then you can find a tarred up version of it on my web page instead:

http://www.cs.utah.edu/~coop/file.tgz

I apologize again for my stupidity.

Nathan

Nathan Cooprider wrote:
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]