This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51832] [4.7 regression] Rev.182970 causes LTO link errors (multiple definitions of allocator_traits)
- From: "markus at trippelsdorf dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 14 Jan 2012 07:48:35 +0000
- Subject: [Bug c++/51832] [4.7 regression] Rev.182970 causes LTO link errors (multiple definitions of allocator_traits)
- Auto-submitted: auto-generated
- References: <bug-51832-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51832
--- Comment #8 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-01-14 07:48:35 UTC ---
Created attachment 26320
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26320
testcase patch
I've attached the original reduced testcase.
markus@x4 allocator_lto_testcase % patch -p0 < testcase.patch
patching file foo.cpp
patching file Makefile
patching file test2.ii
patching file test.ii
markus@x4 allocator_lto_testcase % make
g++ -shared test.ii test2.ii -flto -std=gnu++0x
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /tmp/cc16CrQE.o: multiple definition of
'std::allocator_traits<std::allocator<ElfSegment*>
>::__construct_helper<ElfSegment*, ElfSegment* const&>::value'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/ccd65lbL.o: previous definition here
collect2: error: ld returned 1 exit status
make: *** [all] Error 1