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

--- Comment #5 from Markus Trippelsdorf <markus at trippelsdorf dot de> 
2012-01-12 16:15:32 UTC ---
(In reply to comment #4)
> (In reply to comment #2)
> > error: /tmp/ccZEKdVj.o: multiple definition of
> > '_ZNSt16allocator_traitsISaIiEE18__construct_helperIiJiEE5valueE'
> 
> That symbol is an extra-name alias for
> 
> std::allocator_traits<std::allocator<int> >::__construct_helper<int,
> int>::value
> 
> created by mangle_decl for forward ABI compatibility.
> 
> But I can't reproduce the bug; that variable isn't emitted at all when I
> compile the reduced testcase with r183124.

Hmm, that's strange.

I've updated binutils and gcc just to double-check and it still fails:

(Please note that foo.cpp occurs _twice_ below)
 % g++ -shared foo.cpp foo.cpp -flto -std=c++11 --save-temps
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: foo.o: multiple definition of 'std::allocator_traits<std::allocator<int>
>::__construct_helper<int, int>::value'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
foo.o: previous definition here
[Leaving LTRANS /tmp/ccXhj6nz.args]
[Leaving LTRANS /tmp/ccLh8B76.ltrans.out]
[Leaving LTRANS /tmp/ccIB53Wt.args]
[Leaving LTRANS /tmp/ccLh8B76.ltrans0.o]
collect2: error: ld returned 1 exit status

 % < foo.res
2
foo.o 2
164 ac8416e1b427b8aa PREVAILING_DEF_IRONLY_EXP
_ZNSt16allocator_traitsISaIiEE18__construct_helperIiJiEE5valueE
170 ac8416e1b427b8aa UNDEF
_ZNSt16allocator_traitsISaIiEE18__construct_helperIiIiEE5valueE
foo.o 2
164 ac8416e1b427b8aa PREEMPTED_IR
_ZNSt16allocator_traitsISaIiEE18__construct_helperIiJiEE5valueE
170 ac8416e1b427b8aa UNDEF
_ZNSt16allocator_traitsISaIiEE18__construct_helperIiIiEE5valueE

 % gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-initfini-array --with-gold --enable-secureplt --disable-multilib
--enable-libmudflap --disable-libssp --enable-libgomp --enable-cld
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.7.0/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --with-build-config=bootstrap-lto
--with-boot-ldflags=-Wl,-O1,--hash-style=gnu,--as-needed,--gc-sections,--icf=all,--icf-iterations=3
--enable-version-specific-runtime-libs --disable-libstdcxx-pch
--enable-libstdcxx-time=yes
Thread model: posix
gcc version 4.7.0 20120112 (experimental) (GCC) 

 % ld -v
GNU gold (GNU Binutils 2.22.51.20120112) 1.11

Reply via email to