https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97902

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #9)
> (In reply to H.J. Lu from comment #8)
> > (In reply to Martin Liška from comment #7)
> > > Can you please H.J. take a look?
> > > Maybe we can add a param that will drive the beviour?
> > 
> > I consider this optimization similar inlining or tail call.
> 
> How is that related? I don't see the connection in behavior.

You can't do backtracing with inlining (well, you'll lose those frames).

Here one of the callers will have a correct frame and backtracing still
works, no?

> > Should
> > -fno-omit-frame-pointer disable them?
> 
> I would prefer to revert the patch 8e941ae950ddce1745b4d6819a7131908dd7de24.
> The reporter requested to preserve the frame pointer (with
> -fno-omit-frame-pointer) for backtracing capability and we optimized it out.
> 
> What do you think H.J. ?

I don't think that's good.  It's perfectly valid with optimization.

One could spec a -fforce-frame-pointer but then one needs to define what
its guarantee is.

Reply via email to