From patchwork Mon Jan 7 16:09:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 209964 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 9CB472C0090 for ; Tue, 8 Jan 2013 03:09:44 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1358179784; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=GLpqpQ1mndpZEY4sxm/GSxTiLpg=; b=CjW9zuYtu2fs1pG kuvbvkiLzEt/3OE6Rfz66SeEoAnzXePkVldLOtkS5CNqzCDkzI0X9O92wdQs/aTs BtqHrpehRCyhtxz4JBMWZ4R3PoQk93pqS5shwIVsd5YyxGZY/PwLFrc41/fEdPKj zTUsz8PdTUO0DEGnjEm0JV5oZrOk= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=WsZALmjRDEBK+dFl77STYsLbfYBi/sWzq+yRTH+Eb8NEvw55OHiXyKuAfEVZoe OMonOsmOxibI4fmLeAoRjcu1NAEGDgT2cyNgUkj/lCi/2JpPkSNMupKRwOne8sRO r28icVrf5TXUG1Y2vwj5dXXwgze8ylT3Dn9x3I9StqXSc=; Received: (qmail 18382 invoked by alias); 7 Jan 2013 16:09:38 -0000 Received: (qmail 18370 invoked by uid 22791); 7 Jan 2013 16:09:37 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Jan 2013 16:09:31 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id CBF87EC4 for ; Mon, 7 Jan 2013 17:09:29 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id M1fUMieH-Hwl for ; Mon, 7 Jan 2013 17:09:28 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 3F29CEC3 for ; Mon, 7 Jan 2013 17:09:28 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id r07G9Rqg007758; Mon, 7 Jan 2013 17:09:27 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [testsuite] Fix 32-bit gcc.dg/lto/pr55525 with Sun ld Date: Mon, 07 Jan 2013 17:09:27 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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 gcc.dg/lto/pr55525 currently FAILs on Solaris with Sun ld for the 32-bit multilib: FAIL: gcc.dg/lto/pr55525 c_lto_pr55525_0.o-c_lto_pr55525_1.o link, -flto -w UNRESOLVED: gcc.dg/lto/pr55525 c_lto_pr55525_0.o-c_lto_pr55525_1.o execute -flto -w ld: fatal: symbol 's' has differing sizes: (file c_lto_pr55525_0.o value=0x8; file c_lto_pr55525_1.o value=0x4); tentative symbol cannot override defined symbol of smaller size The following patch (from Richi) fixes this. Tested with the appropriate runtest invocation on i386-pc-solaris2.10 and x86_64-unknown-linux-gnu (both multilibs each), installed on mainline as approved in the PR. Rainer 2013-01-07 Richard Biener * gcc.dg/lto/pr55525_0.c (s): Size like char *. # HG changeset patch # Parent 698c7b5e4929ecd54651ad11b9f49dc7e8c3f395 Fix 32-bit gcc.dg/lto/pr55525 with Sun ld diff --git a/gcc/testsuite/gcc.dg/lto/pr55525_0.c b/gcc/testsuite/gcc.dg/lto/pr55525_0.c --- a/gcc/testsuite/gcc.dg/lto/pr55525_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr55525_0.c @@ -1,7 +1,7 @@ /* { dg-lto-do link } */ /* { dg-lto-options { { -flto -w } } } */ -char s[8]; +char s[sizeof (char *)]; int main(void) { return strcmp(&s[1], "foo");