From: Richard Biener <richard.guenther@gmail.com>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: Eric Botcazou <ebotcazou@adacore.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Andrew Pinski <pinskia@gmail.com>
Subject: Re: [rs6000] Fix compare debug failure on AIX
Date: Mon, 04 May 2015 08:33:00 -0000 [thread overview]
Message-ID: <CAFiYyc1fJDmdM5CWQmdo68j1bBMHdX_ZnA=wWm1m5W1rzHv==w@mail.gmail.com> (raw)
In-Reply-To: <CAGWvnynMA+5dDLgGdyc8EQN2OgfYnV1mBNK5Ww3ceFRpCO1+Yw@mail.gmail.com>
On Mon, May 4, 2015 at 2:32 AM, David Edelsohn <dje.gcc@gmail.com> wrote:
> On Sat, May 2, 2015 at 6:04 AM, Eric Botcazou <ebotcazou@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.
The simple reason is because it is policy for GCC to generate the same
code with -g0 and -g. You can't simply say you don't care.
You never want to run into the situation that you miscompile a program
with -g0 but not with -g because that's very much no fun to debug.
Yes, I don't think we have this policy written down anywhere - something
we should improve on.
Richard.
> 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
next prev parent reply other threads:[~2015-05-04 8:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 10:31 Eric Botcazou
2015-04-29 10:37 ` pinskia
2015-04-30 11:35 ` Eric Botcazou
2015-05-01 13:48 ` David Edelsohn
2015-05-02 4:24 ` Alan Modra
2015-05-02 10:05 ` Eric Botcazou
2015-05-04 0:32 ` David Edelsohn
2015-05-04 8:33 ` Richard Biener [this message]
2015-05-04 13:26 ` Tristan Gingold
2015-05-11 8:25 ` Eric Botcazou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFiYyc1fJDmdM5CWQmdo68j1bBMHdX_ZnA=wWm1m5W1rzHv==w@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=dje.gcc@gmail.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=pinskia@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).