From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30646 invoked by alias); 12 Jan 2012 01:24:32 -0000 Received: (qmail 30636 invoked by uid 22791); 12 Jan 2012 01:24:30 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_SV 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 01:24:17 +0000 From: "markus at trippelsdorf dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/51832] New: [4.7 regression] Rev.182970 causes LTO link errors (multiple definitions of allocator_traits) Date: Thu, 12 Jan 2012 01:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: --- X-Bugzilla-Changed-Fields: Message-ID: 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/msg01328.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51832 Bug #: 51832 Summary: [4.7 regression] Rev.182970 causes LTO link errors (multiple definitions of allocator_traits) Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: markus@trippelsdorf.de Rev.182970 causes LTO link errors because of multiple definitions that all start with '_ZNSt16allocator_traits', e.g.: c++ -o elfhack -fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -march=native -flto=4 -fno-fat-lto-objects -Wno-delete-non-virtual-dtor -fno-strict-aliasing -std=gnu++0x -pthread -ffunction-sections -pipe -fexceptions -DNDEBUG -DTRIMMED -Os -freorder-blocks -fomit-frame-pointer -lpthread -fuse-linker-plugin -Wl,-O1,--hash-style=gnu,--as-needed,--no-keep-memory,--gc-sections -Wl,--icf=safe -Wl,-rpath-link,/var/tmp/mozilla-central/moz-build-dir/dist/bin -Wl,-rpath-link,/usr/lib host_elf.o host_elfhack.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: host_elfhack.o: multiple definition of '_ZNSt16allocator_traitsISaIP10ElfSegmentEE18__construct_helperIS1_JRKS1_EE5valueE' /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: host_elf.o: previous definition here /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: host_elfhack.o: multiple definition of '_ZNSt16allocator_traitsISaIN17ElfStrtab_Section13table_storageEEE18__construct_helperIS1_JS1_EE5valueE' /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: host_elf.o: previous definition here /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: host_elfhack.o: multiple definition of '_ZNSt16allocator_traitsISaI7Elf_RelEE18__construct_helperIS0_JRKS0_EE5valueE' /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: host_elf.o: previous definition here /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: host_elfhack.o: multiple definition of '_ZNSt16allocator_traitsISaI8Elf_RelaEE18__construct_helperIS0_JRKS0_EE5valueE' /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld: host_elf.o: previous definition here collect2: error: ld returned 1 exit status make[1]: *** [elfhack] Error 1 2d847c181ef6fc581d0c915678dedd66e3fdaa15 is the first bad commit commit 2d847c181ef6fc581d0c915678dedd66e3fdaa15 Author: jason Date: Fri Jan 6 21:39:43 2012 +0000 PR c++/6057 PR c++/48051 PR c++/50855 PR c++/51322 gcc/cp/ * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR, THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and PREDECREMENT_EXPR. (write_template_arg): Fix mangling of class-scope functions and argument packs. (mangle_decl): Update suggested -fabi-version argument. * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR, DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR. * tree.c (dependent_name): No longer static. * cp-tree.h: Declare it. * pt.c (unify): Defer handling of unconverted functions. include/ * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY. libiberty/ * cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_NULLARY and DEMANGLE_COMPONENT_INITIALIZER_LIST. (d_make_comp): Likewise. Allow null right arg for DEMANGLE_COMPONENT_TRINARY_ARG2. (cplus_demangle_operators): Adjust new/delete; add .*, :: and throw. (d_template_args, d_template_arg): Handle 'J' for argument packs. (d_exprlist): Add terminator parm. (d_expression, d_print_comp): Handle initializer lists, nullary expressions, prefix/suffix operators, and new. (d_print_subexpr): Avoid parens around DEMANGLE_COMPONENT_QUAL_NAME and DEMANGLE_COMPONENT_INITIALIZER_LIST. * testsuite/demangle-expected: Add tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182970 138bc75d-0d04-0410-961f-82ee72b054a4