public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/44463]  New: whopr does not work with weak functions
@ 2010-06-08  8:42 andi-gcc at firstfloor dot org
  2010-06-10 12:23 ` [Bug lto/44463] " andi-gcc at firstfloor dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: andi-gcc at firstfloor dot org @ 2010-06-08  8:42 UTC (permalink / raw)
  To: gcc-bugs

Hit this while attempting to compile a large code base with WHOPR:

tweak1.c:
void y(void) { printf("y\n"); } 
void x(void) __attribute__((weak, alias("y"))); 

tweak2.c:
void x(void) { printf("strong\n"); }

tweak3.c:
extern void x(void);

int main(void) { x(); return 0; }

Compile  with

gcc -fwhopr -c -O2 tweak1.c
gcc -fwhopr -c -O2 tweak2.c
gcc -fwhopr -c -O2 tweak3.c
gcc -fwhopr tweak[123].o
/tmp/ccGG7BOa.ltrans1.ltrans.o: In function `x':
ccGG7BOa.ltrans1.o:(.text+0x0): multiple definition of `x'
/tmp/ccGG7BOa.ltrans0.ltrans.o:ccGG7BOa.ltrans0.o:(.text+0x0): first defined
here
collect2: ld returned 1 exit status

Without -fwhopr it works

Version:
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/pkg/gcc-4.6-100607
--enable-checking=release --enable-languages=c,c++ --disable-nls --enable-lto
--enable-gold --with-plugin-ld=/usr/local/bin/gold
--with-elf-include=/usr/include/libelf
Thread model: posix
gcc version 4.6.0 20100607 (experimental) (GCC)


-- 
           Summary: whopr does not work with weak functions
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andi-gcc at firstfloor dot org
  GCC host triplet: x86_64-linux
GCC target triplet: x86_64-linux


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-09-26 17:09 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-44463-4@http.gcc.gnu.org/bugzilla/>
2010-12-14 16:28 ` [Bug lto/44463] whopr does not work with weak functions hubicka at gcc dot gnu.org
2010-12-14 23:22 ` hubicka at gcc dot gnu.org
2010-12-14 23:24 ` hubicka at gcc dot gnu.org
2011-01-07  1:38 ` hubicka at gcc dot gnu.org
2011-01-07 12:44   ` Jan Hubicka
2011-01-07 12:47 ` hubicka at ucw dot cz
2011-01-09  7:35 ` hubicka at gcc dot gnu.org
2011-01-10 13:20 ` rguenther at suse dot de
2011-01-10 13:27 ` hubicka at ucw dot cz
2011-10-07  5:53 ` andi-gcc at firstfloor dot org
2011-10-07  8:40 ` hubicka at ucw dot cz
2014-09-26 16:31 ` hubicka at gcc dot gnu.org
2014-09-26 16:40 ` andi-gcc at firstfloor dot org
2014-09-26 17:09 ` hubicka at gcc dot gnu.org
2010-06-08  8:42 [Bug lto/44463] New: " andi-gcc at firstfloor dot org
2010-06-10 12:23 ` [Bug lto/44463] " andi-gcc at firstfloor dot org
2010-06-10 12:29 ` rguenth at gcc dot gnu dot org
2010-06-10 12:59 ` andi-gcc at firstfloor dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).