From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117024 invoked by alias); 4 May 2015 08:33:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 117014 invoked by uid 89); 4 May 2015 08:33:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f179.google.com Received: from mail-ob0-f179.google.com (HELO mail-ob0-f179.google.com) (209.85.214.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 04 May 2015 08:33:32 +0000 Received: by obblk2 with SMTP id lk2so62363476obb.0 for ; Mon, 04 May 2015 01:33:30 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.177.68 with SMTP id a65mr16205754oif.46.1430728410727; Mon, 04 May 2015 01:33:30 -0700 (PDT) Received: by 10.76.115.167 with HTTP; Mon, 4 May 2015 01:33:30 -0700 (PDT) In-Reply-To: References: <1633828.L6eKc0dpVU@polaris> <1752984.z0ljzjyPbr@polaris> <11730594.qrxZLO7yKG@polaris> Date: Mon, 04 May 2015 08:33:00 -0000 Message-ID: Subject: Re: [rs6000] Fix compare debug failure on AIX From: Richard Biener To: David Edelsohn Cc: Eric Botcazou , GCC Patches , Andrew Pinski Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00190.txt.bz2 On Mon, May 4, 2015 at 2:32 AM, David Edelsohn wrote: > On Sat, May 2, 2015 at 6:04 AM, Eric Botcazou 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