On Sat, May 2, 2015 at 6:04 AM, Eric Botcazou <ebotca...@adacore.com> wrote:
>> Why should GCC unnecessarily create stack frames to avoid
>> compare-debug testcase failures?
>
> I'm not sure I understand the question... compare-debug failures are failures
> (-g is not supposed to change the generated code and this XCOFF-specific bug
> was reported to us) so they need to be fixed.
>
> From there on, as Alan said, there are 2 cases: either AIX needs a frame for
> debugging or it doesn't.  If the latter, then the lines can simply be deleted.
> If the former, we have to draw a line somewhere; Alan suggests always creating
> a frame while I suggest creating it only at -O0 and -Og.

I believe that AIX does need a frame for debugging.  I don't remember
the exact reason off hand.

I'm sorry that XCOFF debugging changes the generated code (only in the
sense of allocating a frame), but that is a system dependency.  It's
been this way for over 20 years.  I see no reason to produce worse
code at -O0 when not debugging simply to make testcases happier.

By the way, I'm still waiting for the DWARF debugging patches from
Adacore compatible with AIX as and ld.  DWARF debugging would not
require pushing a frame, and would resolve the failure when testing
with DWARF.  The patch would be adjusted to only push a frame when
writing XCOFF debugging.

- David

Reply via email to