From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5267 invoked by alias); 27 May 2014 08:34:33 -0000 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 Received: (qmail 5213 invoked by uid 48); 27 May 2014 08:34:30 -0000 From: "pluto at agmk dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/61329] New: #include and _GLIBCXX_DEBUG causes multiple symbol definition. Date: Tue, 27 May 2014 08:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pluto at agmk dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02287.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61329 Bug ID: 61329 Summary: #include and _GLIBCXX_DEBUG causes multiple symbol definition. Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: pluto at agmk dot net Created attachment 32860 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32860&action=edit testcase % g++ t.cpp -Og -g0 -c -std=c++11 -D_GLIBCXX_DEBUG % g++ u.cpp -Og -g0 -c -std=c++11 -D_GLIBCXX_DEBUG % g++ t.o u.o -s -o /dev/null u.o: In function `std::__detail::__7::_State_base::_M_print(std::__7::basic_ostream >&) const': u.cpp:(.text+0x0): multiple definition of `std::__detail::__7::_State_base::_M_print(std::__7::basic_ostream >&) const' t.o:t.cpp:(.text+0x0): first defined here u.o: In function `std::__detail::__7::_State_base::_M_dot(std::__7::basic_ostream >&, long) const': u.cpp:(.text+0x1ae): multiple definition of `std::__detail::__7::_State_base::_M_dot(std::__7::basic_ostream >&, long) const' t.o:t.cpp:(.text+0x1ae): first defined here collect2: error: ld returned 1 exit status % g++ -v Using built-in specs. COLLECT_GCC=/ahome/pawels/dvm/master/toolchain/gcc/sysroot/x86_64-gnu-linux/bin/x86_64-gnu-linux-g++ COLLECT_LTO_WRAPPER=/home/pawels/dvm/master/toolchain/gcc/sysroot/x86_64-gnu-linux/bin/../lib64/gcc/x86_64-gnu-linux/4.9.1/lto-wrapper Target: x86_64-gnu-linux Configured with: ../configure --target=x86_64-gnu-linux --with-arch=x86-64 --prefix=/home/pawels/toolchain.git/gcc/sysroot/x86_64-gnu-linux --with-sysroot=/home/pawels/toolchain.git/gcc/sysroot/x86_64-gnu-linux --libdir=/home/pawels/toolchain.git/gcc/sysroot/x86_64-gnu-linux/lib64 --libexecdir=/home/pawels/toolchain.git/gcc/sysroot/x86_64-gnu-linux/lib64 --with-slibdir=/home/pawels/toolchain.git/gcc/sysroot/x86_64-gnu-linux/lib64 --with-gmp-include=/home/pawels/toolchain.git/gcc/x86_64-gnu-linux/gcc-math-runtime/include --with-gmp-lib=/home/pawels/toolchain.git/gcc/x86_64-gnu-linux/gcc-math-runtime/lib --with-mpfr-include=/home/pawels/toolchain.git/gcc/x86_64-gnu-linux/gcc-math-runtime/include --with-mpfr-lib=/home/pawels/toolchain.git/gcc/x86_64-gnu-linux/gcc-math-runtime/lib --with-mpc-include=/home/pawels/toolchain.git/gcc/x86_64-gnu-linux/gcc-math-runtime/include --with-mpc-lib=/home/pawels/toolchain.git/gcc/x86_64-gnu-linux/gcc-math-runtime/lib --with-linker-hash-style=both --disable-multilib --enable-nls --disable-libssp --disable-libquadmath --disable-libitm --enable-tls --enable-libstdcxx-allocator=new --enable-extern-template --enable-libstdcxx-time=rt --enable-libstdcxx-threads --enable-symvers=gnu-versioned-namespace --disable-libstdcxx-pch --enable-lto --enable-plugin --enable-c99 --enable-long-long --enable-linux-futex --enable-threads=posix --enable-shared --with-pic --enable-gold --enable-libgomp --enable-__cxa_atexit --disable-initfini-array --disable-gnu-unique-object --enable-languages=c,c++ --enable-checking=release --with-long-double-128 --disable-cld --disable-bootstrap Thread model: posix gcc version 4.9.1 20140505 (prerelease) (GCC)