optimization/5979: -fomit-frame-pointer inoperative in GCC 3.0.4 (x86)

mrj@bigpond.net.au mrj@bigpond.net.au
Sat Mar 16 03:26:00 GMT 2002

>Number:         5979
>Category:       optimization
>Synopsis:       -fomit-frame-pointer inoperative in GCC 3.0.4 (x86)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 16 03:26:01 PST 2002
>Originator:     Mark Reginald James
>Release:        3.0.4
System: Linux 2.4.18 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../src/configure --prefix=/usr --with-cpu=athlon
In 3.0.4 the ebp register is used as a frame pointer despite use of the -fomit-frame-pointer option.
Compile this program:

	int a=1;

with options -S -fomit-frame-pointer, and note used of epb
in the assembly output.
Change any assembly-coded function that expects epb to be unused to save and restore the epb register.

More information about the Gcc-bugs mailing list