This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need some clarification about optimization flags, what "exactly" does -O1 do?


On Thu, Nov 27, 2008 at 11:21:38AM +0100, Andrzej Giniewicz wrote:
> Hi - it's my first time on that list, I hope I choose good one as gcc
> have really quite number of different mailing lists :)
> 
> lately I hit very strange behaviour, i.e. the app I wanted to build
> works when I build it with -O0 but crash at -O1, I wanted to eliminate
> flags that work as I usually do, by doing -O0 and adding all flags
> that are on -O1 and aren't on -O0, I got their list using standard
> recommended by manual way:
> 
> g++ -c -Q -O0 --help=optimize > 0.flags
> g++ -c -Q -O1 --help=optimize > 1.flags
> diff 0.flags 1.flags | grep enabled

Just for reference, there are optimizations that are done based on the
optimization level, and not on particular -f switches.

-- 
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]