http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51832

--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 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).

Reply via email to