From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26255 invoked by alias); 13 May 2013 21:44:10 -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 26212 invoked by uid 48); 13 May 2013 21:44:06 -0000 From: "dimhen at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/57267] New: [4.9 regression] -flto-partition=none : symbol is already defined Date: Mon, 13 May 2013 21:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dimhen at gmail dot com 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 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: 2013-05/txt/msg00872.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57267 Bug ID: 57267 Summary: [4.9 regression] -flto-partition=none : symbol is already defined Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: dimhen at gmail dot com 198366 PASS 198828 FAIL $ g++ -fpreprocessed -flto -c a.ii -o a.o $ g++ -fpreprocessed -flto -c b.ii -o b.o $ g++ -shared a.o b.o -O -flto -flto-partition=none -o x.so /tmp/ccozW37q.s: Assembler messages: /tmp/ccozW37q.s:16: Error: symbol `_ZL28__gthrw___pthread_key_createPjPFvPvE' is already defined lto-wrapper: g++ returned 1 exit status /usr/bin/ld: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status $ cat a.ii void pthread_key_create (unsigned *, void (void *)); static __typeof pthread_key_create __gthrw___pthread_key_create __attribute__ ((__weakref__ ("__pthread_key_create"))); void *a = (void *) &__gthrw___pthread_key_create; $ cat b.ii void pthread_key_create (unsigned *, void (void *)); static __typeof pthread_key_create __gthrw___pthread_key_create __attribute__ ((__weakref__ ("__pthread_key_create"))); void *__exchange_and_add_dispatch___gthread_active_ptr = (void *) &__gthrw___pthread_key_create; $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /home/dimhen/src/gcc-current/configure --prefix=/usr/local/gcc_current --with-multilib-list=m64 --enable-__cxa_atexit --enable-shared --enable-checking=yes,df,fold,rtl,tree --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,lto --enable-plugin --with-tune=native --with-march=native --enable-version-specific-runtime-libs Thread model: posix gcc version 4.9.0 20130513 (experimental) [trunk revision 198828] (GCC)