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.

Reply via email to