From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20036 invoked by alias); 12 Jan 2012 09:07:55 -0000 Received: (qmail 20027 invoked by uid 22791); 12 Jan 2012 09:07:54 -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; Thu, 12 Jan 2012 09:07:42 +0000 From: "markus at trippelsdorf dot de" 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: Thu, 12 Jan 2012 09:07: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: markus at trippelsdorf dot de X-Bugzilla-Status: UNCONFIRMED 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/msg01348.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51832 --- Comment #2 from Markus Trippelsdorf 2012-01-12 09:06:57 UTC --- (In reply to comment #1) > Can you attach preprocessed sources to reproduce this? I've reduced it to this snipped: % cat foo.cpp #include struct foo { void bar () { s.push_back (0); } std::vector s; }; % g++ foo.cpp foo.cpp -flto -std=gnu++0x /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: /tmp/ccZEKdVj.o: multiple definition of '_ZNSt16allocator_traitsISaIiEE18__construct_helperIiJiEE5valueE' /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/cc1lLTi3.o: previous definition here ../sysdeps/x86_64/elf/start.S:109: error: undefined reference to 'main' collect2: error: ld returned 1 exit statu