From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30925 invoked by alias); 16 Jan 2012 10:54:18 -0000 Received: (qmail 30914 invoked by uid 22791); 16 Jan 2012 10:54:17 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Jan 2012 10:54:04 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/51832] [4.7 regression] Rev.182970 causes LTO link errors (multiple definitions of allocator_traits) Date: Mon, 16 Jan 2012 10:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg01752.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51832 --- Comment #10 from Richard Guenther 2012-01-16 10:53:48 UTC --- I can't reproduce it with the reduced testcase but _can_ reproduce it with test.ii test2.ii from the attachment. trunk-g/gcc> ./g++ -B. /tmp/test.ii /tmp/test2.ii -std=gnu++0x -B ../x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/ -flto /tmp/ccaH7unB.o (symbol from plugin): In function `_ZNSt16allocator_traitsISaIP10ElfSegmentEE18__construct_helperIS1_JRKS1_EE5valueE': (.text+0x0): multiple definition of `_ZNSt16allocator_traitsISaIP10ElfSegmentEE18__construct_helperIS1_JRKS1_EE5valueE' /tmp/ccsJ08q0.o (symbol from plugin):(.text+0x0): first defined here /usr/lib/../lib64/crt1.o: In function `_start': /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main' collect2: error: ld returned 1 exit status trunk-g/gcc> ./g++ -B. /tmp/test.ii /tmp/test2.ii -std=gnu++0x -B ../x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/ /usr/lib/../lib64/crt1.o: In function `_start': /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main' collect2: error: ld returned 1 exit status It does not reproduce when not using the linker plugin though and I am using a linker that uses the v2 interface with the fancy COMDAT support (the 2.22 release).