This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
- From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 8 Jun 2011 13:52:18 +0000
- Subject: [Bug lto/49302] [4.7 Regression] FAIL: gcc.dg/lto/20110201-1 c_lto_20110201-1_0.o-c_lto_20110201-1_0.o
- Auto-submitted: auto-generated
- References: <bug-49302-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49302
--- Comment #9 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-06-08 13:51:34 UTC ---
Hm, this isn't going to work for all cases. When I reproduce the problem on
powerpc64-linux without forcing a hardware square root, I see:
spawn /home/wschmidt/gcc/build/gcc-mainline-pr49302/gcc/xgcc
-B/home/wschmidt/gcc/build/gcc-mainline-pr49302/gcc/ c_lto_20110201-1_0.o -O0
-flto -O2 -ffast-math -fuse-linker-plugin -m32 -o gcc-dg-lto-20110201-1-01
/tmp/cc1mUEPp.ltrans0.ltrans.o: In function `foo':
cc1mUEPp.ltrans0.o:(.text+0x5c): undefined reference to `pow'
cc1mUEPp.ltrans0.o:(.text+0x74): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
compiler exited with status 1
output is:
/tmp/cc1mUEPp.ltrans0.ltrans.o: In function `foo':
cc1mUEPp.ltrans0.o:(.text+0x5c): undefined reference to `pow'
cc1mUEPp.ltrans0.o:(.text+0x74): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Expanding cabs to sqrt(r*r + i*i) will still leave an unresolved reference to
sqrt.