http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48832

           Summary: -O2 does not imply -fomit-frame-pointer, contrary to
                    --help=optimizers -v -Q
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: mar...@jet.franken.de
              Host: x86_64-suse-linux
            Target: i586-suse-linux
             Build: i586-suse-linux


$ gcc -v -O2 -m32 -Q --help=optimizers 2>&1|grep omit-frame
  -fomit-frame-pointer                  [enabled]
$ cat >xx.c
int f() { return 1; } 
$ gcc -O2 -m32 -c xx.c ; objdump -d xx.o
...
00000000 <f>:
   0:   55                      push   %ebp
   1:   b8 01 00 00 00          mov    $0x1,%eax
   6:   89 e5                   mov    %esp,%ebp
   8:   5d                      pop    %ebp
   9:   c3                      ret    
$


seems gcc is lying in --help=optimizers

I cannot see why in the sources though.

Reply via email to