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

Re: builtin_return_addr vs frame_pointer_needed vs -O3


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


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