------- Additional Comments From Thomas dot Koenig at online dot de 2005-02-27 12:52 ------- Is this really fixed?
Look at this: $ cat c-div.c #include <math.h> #include <complex.h> int main() { float a; complex float b,c; foo(&a,&b); c = b/a; return creal(c) + cimag(c) < 0; } $ gcc -ffast-math -O3 -fdump-tree-optimized -fno-cx-limited-range -S c-div.c $ tail -20 c-div.c.t65.optimized if (ABS_EXPR <SR.26> < 0.0) goto <L1>; else goto <L2>; <L1>:; D.3021 = SR.26 * Inf; D.3022 = SR.26 * D.3021; c$real = (D.3012 + D.3011 * D.3021) / D.3022; c$imag = (D.3012 * D.3021 - D.3011) / D.3022; goto <bb 3>; <L2>:; D.3030 = 0.0 / SR.26; c$real = (D.3011 + D.3012 * D.3030) / SR.26; c$imag = (D.3012 - D.3011 * D.3030) / SR.26; <bb 3>: return (double) c$real + (double) c$imag < 0.0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19953