This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: builtin_return_addr vs frame_pointer_needed vs -O3
- From: Ian Dall <ian at beware dot dropbear dot id dot au>
- To: schwab at suse dot de
- Cc: rth at redhat dot com, ian at beware dot dropbear dot id dot au, dj at redhat dot com, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 27 Jun 2002 08:33:11 +0930
- Subject: Re: builtin_return_addr vs frame_pointer_needed vs -O3
- References: <200101312226.RAA29943@greed.delorie.com><20010131170452.A13854@redhat.com><15641.30554.720720.529367@gargle.gargle.HOWL><20020626074538.C25683@redhat.com><jebs9y6pq3.fsf@sykes.suse.de>
Andreas Schwab writes:
> Richard Henderson <rth@redhat.com> writes:
>
> |> *shrug* Perhaps. My thought had been that just because this
> |> translation unit uses flag_omit_frame_pointer doesn't mean
> |> that the calling translation unit did. But on the other hand
> |> I suppose it's a relatively safe assumption that the entire
> |> application is compiled with the same cflags.
>
> I don't think this is safe. Libraries also become part of the
> application, but they are usually compiled in a different environment.
Yep. I hadn't thought about that. I notice __builtin_return_address
is documented to not be reliable for other frames. It kind of raises the
question of why this particular test is in the testsuite and whether
we should bother trying to make it work.
Maybe that particular test should just not be run with -fomit-frame-pointer?
Ian