From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58789 invoked by alias); 29 Apr 2015 10:23:30 -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 58779 invoked by uid 89); 29 Apr 2015 10:23:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 29 Apr 2015 10:23:28 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 6E2792E1DD1F; Wed, 29 Apr 2015 12:23:24 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b3JKyS0lo-F4; Wed, 29 Apr 2015 12:23:24 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 33A162E1DD00; Wed, 29 Apr 2015 12:23:24 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Cc: David Edelsohn Subject: [rs6000] Fix compare debug failure on AIX Date: Wed, 29 Apr 2015 10:31:00 -0000 Message-ID: <1633828.L6eKc0dpVU@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2554341.JWg0VE0umU" Content-Transfer-Encoding: 7Bit X-SW-Source: 2015-04/txt/msg01850.txt.bz2 --nextPart2554341.JWg0VE0umU Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 645 You can easily get -fcompare-debug failures on AIX with small functions, in fact you get the failure for the empty function: void foo (void) {} eric@polaris:~/build/gcc/powerpc-ibm-aix7.1> gcc/xgcc -Bgcc -S t.c -O - fcompare-debug xgcc: error: t.c: -fcompare-debug failure (length) Fixed thusly, tested on powerpc-ibm-aix7.1, OK for the mainline? 2015-04-29 Eric Botcazou * config/rs6000/rs6000.c (rs6000_stack_info): For XCOFF, replace test on debug info with test on optimization to decide stack pushing. 2015-04-29 Eric Botcazou * gcc.dg/empty3.c: New test. -- Eric Botcazou --nextPart2554341.JWg0VE0umU Content-Disposition: attachment; filename="p.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="utf-8"; name="p.diff" Content-length: 1060 Index: config/rs6000/rs6000.c =================================================================== --- config/rs6000/rs6000.c (revision 222439) +++ config/rs6000/rs6000.c (working copy) @@ -21932,8 +21932,8 @@ rs6000_stack_info (void) /* Determine if we need to allocate any stack frame: For AIX we need to push the stack if a frame pointer is needed - (because the stack might be dynamically adjusted), if we are - debugging, if we make calls, or if the sum of fp_save, gp_save, + (because the stack might be dynamically adjusted), if we are not + optimizing, if we make calls, or if the sum of fp_save, gp_save, and local variables are more than the space needed to save all non-volatile registers: 32-bit: 18*8 + 19*4 = 220 or 64-bit: 18*8 + 18*8 = 288 (GPR13 reserved). @@ -21950,7 +21950,7 @@ rs6000_stack_info (void) else if (frame_pointer_needed) info_ptr->push_p = 1; - else if (TARGET_XCOFF && write_symbols != NO_DEBUG) + else if (TARGET_XCOFF && !optimize) info_ptr->push_p = 1; else --nextPart2554341.JWg0VE0umU Content-Disposition: attachment; filename="empty3.c" Content-Transfer-Encoding: 7Bit Content-Type: text/x-csrc; charset="utf-8"; name="empty3.c" Content-length: 61 /* { dg-options "-O -fcompare-debug" } */ void foo (void) {} --nextPart2554341.JWg0VE0umU--