other/8335: problems with __builtin_frame_address when -fomit-frame-pointer used

davmac@ozonline.com.au davmac@ozonline.com.au
Wed Oct 23 23:56:00 GMT 2002


>Number:         8335
>Category:       other
>Synopsis:       problems with __builtin_frame_address when -fomit-frame-pointer used
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 23 23:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Davin McCall
>Release:        3.2
>Organization:
>Environment:
i686-pc-linux-gnu running linux 2.4.18. gcc version 3.2 (and 3.1.1, others not checked)
>Description:
When using -fomit-frame-pointer option, the builtin function
__builtin_frame_address doesn't always work correctly (at
least with a 0 argument).

This is something of a no-brainer anyway seeing as one
probably shouldn't request the frame address when one has
explicitly requested no frame pointers, but I couldn't find
any reference in the documentation which mentioned this; I
should think, in any case, that the compiler should give an
error or at least a warning when an attempt to use
__builtin_frame_address with -fomit-frame-pointer.

As an alternative, any function which uses the builtin could
be forced to have a frame generated, OR at least an attempt
to return a meaningful or "near-enough" value (such as %esp)
could be made.

I assume that this is just an oversight, however if it is
actually a bug I can provide a preprocessed source file
which reproduces it (if needed).
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list