[PATCH] Incorrect code for __builtin_frame_address(0)

Richard Henderson rth@redhat.com
Thu Aug 18 23:34:00 GMT 2005


On Thu, Aug 18, 2005 at 11:30:34AM -0700, James E Wilson wrote:
> Also, as mentioned above, x86 is one of the targets that is currently
> broken, and for which non-zero counts should work.

Well, yes and no.  Even with disabling frame-pointer elimination
in the current function, you're not affecting whether the frame-
pointer is eliminated elsewhere in the call stack.

Which means that count = 1 can be made to not crash, but not to
produce correct data.  Further, count > 1 cannot be made to
reliably not crash.

The builtins are reasonable debugging tools when used under 
controlled circumstances.  I wouldn't ever state more than that.
Frankly, it wouldn't bother me at all if we warn whenever someone
uses a non-zero count and -fomit-frame-pointer is enabled.


r~



More information about the Gcc-patches mailing list