------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-06-14 10:55 ------- Well, my latest tests on alphaev67-linux (http://gcc.gnu.org/ml/gcc-testresults/2005-06/msg00870.html) does not show any improvement (most failures are due to this problem). What I don't understand is why rth doesn't have this problem (from http://gcc.gnu.org/ml/gcc-testresults/2005-06/msg00640.html, you can see that he didn't have this problem even before the patch was committed).
I don't have much time to look at this now, but generated code looks OK: $ cat a.f90.t02.original MAIN__ () { complex4 z; complex4 c; z = __complex__ (4.0e+0, 0.0); c = csqrtf (z); Even using this straight from C works OK with the system compiler: $ cat a.c #include <complex.h> #include <math.h> int main (void) { complex z; z = 4; z = csqrtf(z); printf ("%g\n",z); return 0; } $ gcc a.c -lm && ./a.out 2 But it fails if you use the 4.1.0 compiler: $ ./bin/gcc -static -lm a.c a.c: In function 'main': a.c:8: warning: incompatible implicit declaration of built-in function 'printf' /tmp/cce9eolp.o: In function `main': /tmp/cce9eolp.o(.text+0x50): undefined reference to `csqrtf' collect2: ld returned 1 exit status -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21797