This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Need some clarification about optimization flags, what "exactly" does -O1 do?
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: Andrzej Giniewicz <gginiu at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 28 Nov 2008 10:09:09 -0500
- Subject: Re: Need some clarification about optimization flags, what "exactly" does -O1 do?
- References: <f6d5b6a20811270221jce1e76al39ceded1a3508a81@mail.gmail.com>
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