From patchwork Thu Sep 9 16:02:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 64310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 61F9BB6F0E for ; Fri, 10 Sep 2010 02:02:35 +1000 (EST) Received: (qmail 25664 invoked by alias); 9 Sep 2010 16:02:32 -0000 Received: (qmail 25649 invoked by uid 22791); 9 Sep 2010 16:02:32 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 09 Sep 2010 16:02:27 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id DF6C5B005C; Thu, 9 Sep 2010 12:02:24 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id o89G2OjC010491; Thu, 9 Sep 2010 12:02:24 -0400 Date: Thu, 9 Sep 2010 12:02:24 -0400 From: Jack Howarth To: gcc-patches@gcc.gnu.org Cc: mikestump@comcast.net, iains@gcc.gnu.org Subject: [PATCH] Fix PR42070 by pruning harmless linker warnings on darwin Message-ID: <20100909160224.GA10489@bromo.med.uc.edu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Currently darwin10 is failing the excessive error test for the compilation of g++.dg/tree-prof/partition1.C and g++.dg/tree-prof/partition2.C with -g -fprofile-use due to the bogus linker warnings "ld: warning: can't add line info to anonymous symbol". This warning has been removed from the next Xcode release due to the excessive noise it generates when linking. Since the resulting binaries created with these bogus warnings all execute fine, this warning should be ignored. The attached patch adds an an entry to gcc/testsuite/lib/prune.exp. Tested on x86_64-apple-darwin10. Okay for gcc trunk as well as gcc 4.5.2? Jack ps I added the pruning to gcc/testsuite/lib/prune.exp instead of just adding a dg-prune-output entry to the test cases because that approach produces warnings during the testsuite run of the form... WARNING: profopt.exp does not support dg-prune-output 2010-09-09 Jack Howarth PR target/42070 * gcc/testsuite/lib/prune.exp: Prune bogus linker warnings. Index: gcc/testsuite/lib/prune.exp =================================================================== --- gcc/testsuite/lib/prune.exp (revision 164110) +++ gcc/testsuite/lib/prune.exp (working copy) @@ -49,6 +49,9 @@ regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text + # Ignore harmless warnings from Xcode 3.2.x. + regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol" $text "" text + #send_user "After:$text\n" return $text