From patchwork Thu Sep 13 16:45:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinliang David Li X-Patchwork-Id: 183680 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 D61E22C0088 for ; Fri, 14 Sep 2012 02:45:43 +1000 (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=1348159544; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=yPvWOGZ fxaFUFyRm80iUNR8233U=; b=Cstdpep6sID0BwljHPrNSvtLihvn4czsqxPlGkr 1Tau4Mzo4KsKY03lSY7GJYZlm3NZF3IYt6BYGj6fez0DZNi3suD/mkY9/Db34M4E mb2fHwBxymj6BGqDvlpLQaWBJLtdEUnjN7J15VfO2edcdDql1J+nSg8Tlk7eUI+j S8Ig= 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:X-Google-DKIM-Signature:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-System-Of-Record:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=v7Yb8H+legPGmVvfMxMXIwmwxTtc/xF+UKjmmkHJoQ2e+O+qIPJSycGT+w/b1o HK4EZjP+lBD/U0bBMi0mrZ3sh9A21MB6B2L9/CqSVsTrTjjSqOkXgxeYKQakB5yh i3tutTTmSWMuKSN482MIlyCNN1S5LFAwO26h2HlpXakYw=; Received: (qmail 14943 invoked by alias); 13 Sep 2012 16:45:33 -0000 Received: (qmail 14917 invoked by uid 22791); 13 Sep 2012 16:45:27 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Sep 2012 16:45:14 +0000 Received: by lban1 with SMTP id n1so2156791lba.20 for ; Thu, 13 Sep 2012 09:45:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-system-of-record:x-gm-message-state; bh=h6hLnv2CD3sclfvhnjVFbxZKtR+n3ok2i4iUeYZjTM8=; b=FmN0yKmPg1Pwfoeyx7ThjGV0IWUtP1RIM2xjUhXm4qIQR6HA9LL/XabaqomhZ/KACz NKf+wOUBbI/xCh3lt6DRmRWVVWw+ku48nBNKt5OmxIGgi5sSDENYDch3sZc10KY1HDxy 5fJMxQmJW3HCWdwdCupWndtTVd8CpsknqjLGr1Yf6Xo6veCrykys8yDVrw5b7eehK4SQ 3x/Tkv+C8X0UKRw2ycT7HWO0vwV/v3tZZs0S1enhNDqdZdV3P3V9/ntMfdbyXa/2is8n QmWJpoAkFTAPB0j2O97P0mNJq4a2SBkaNbYHjFpAXSdUISd8RY57fxbmysPL2zmZ1FZW cpmw== Received: by 10.152.146.169 with SMTP id td9mr2489158lab.42.1347554713069; Thu, 13 Sep 2012 09:45:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.146.169 with SMTP id td9mr2489149lab.42.1347554712945; Thu, 13 Sep 2012 09:45:12 -0700 (PDT) Received: by 10.152.132.136 with HTTP; Thu, 13 Sep 2012 09:45:12 -0700 (PDT) Date: Thu, 13 Sep 2012 09:45:12 -0700 Message-ID: Subject: [google] Fix duplicate symbol error reported by assembler From: Xinliang David Li To: GCC Patches X-System-Of-Record: true X-Gm-Message-State: ALoCoQkh3nYR9JMhBMOTcKVvSbZ4ab6zil7LQ/YpqBPzw5VOp8lJ58VLWPdcE/lY8t9JdAPoXRjyRjGnNj4r5H3LUjldPHohzwEFz3fdmq8AUiMfpqry34R/bjCljKPu/9HA6UyJlO7WQe6LQ9wHJyDF0c/NuO/eHTjno4rwQyDqEdXRyLdQvcdWm+UUkxoU5sOrizu3Q0sw 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 The following patch fixes a problem exposed in LIPO random stress testing with large module groups -- the error is that multiple copies compiler generated static functions (ctor of class in anonymous namespace) get emitted. David Index: cgraphunit.c =================================================================== --- cgraphunit.c (revision 191267) +++ cgraphunit.c (revision 191268) @@ -1430,7 +1430,12 @@ cgraph_add_output_node (struct cgraph_no if (!L_IPO_COMP_MODE) return node; - if (!TREE_PUBLIC (node->decl)) + /* Never common non public names except for compiler + generated static functions. (they are not promoted + to globals either. */ + if (!TREE_PUBLIC (node->decl) + && !(DECL_ARTIFICIAL (node->decl) + && DECL_ASSEMBLER_NAME_SET_P (node->decl))) return node; if (!output_node_hash)