This is the mail archive of the gcc-bugs@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]

problem on -fomit-frame-pointer


Hello,I'm am using a x86 platform and I'm trying to use gcc 2.95.x ,gcc
3.0.x and gcc 3.1 to compile the following code and generate the
assembly of it:

gcc foo.c -S -O2 -fomit-frame-pointer
gcc foo.c -S -O2 


foo.c :
#include <stdio.h>
int main(int argc,char *argv[])
{
        printf("hello world!\n");
        return 0;
}

comparing the output between with and without -fomit-frame-pointer ,
gcc 2.95 work fine : the code to generate the frame pointer e.g 
"     movl    %esp, %ebp " is not shown when given an
-fomit-frame-pointer options when compiling the code

however,there seem to be no effect on gcc 3.0 and gcc 3.1,a frame
pointer is still kept on register ebp with the code " movl    %esp,
%ebp",
diff the 2 assembly code with and without -fomit-frame-pointer shown
no difference .

bug?



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