This is the mail archive of the gcc@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: Frame pointer, bug or feature? (x86)


On Mon, Nov 18, 2013 at 11:22:22AM -0800, Hendrik Greving wrote:
> Interesting, I just read up on it and I didn't know that. Thanks. Is
> it correct to say though that it is a missing optimization and
> frame_pointer_needed shouldn't evaluate to true?

Certainly not unconditionally.  It depends on the size and in which scope
it is declared.  If user meant to use a VLA and compiler optimizes it into
non-VLA, then it isn't deallocated at the end of it's scope, so if it e.g.
is very large or there are many of those, the optimization can break valid
programs (especially if it's scope isn't the function scope but some smaller
scope).

	Jakub


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