[Bug middle-end/19953] Special-case real + complex arithmetic operation (-ffast-math)
Thomas dot Koenig at online dot de
gcc-bugzilla@gcc.gnu.org
Tue Mar 1 15:44:00 GMT 2005
------- Additional Comments From Thomas dot Koenig at online dot de 2005-03-01 15:43 -------
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #11)
> I get the same as I got above with the following version on x86:
> GNU C version 4.0.0 20050225 (experimental) (i686-pc-linux-gnu)
> compiled by GNU C version 4.0.0 20050225 (experimental).
> GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
> And no local patches which could cause this.
I can only assume that this has regressed, that this is a
little-endian problem (why it should be so is beyond me, though),
that your specific vibes make this go away or that mine make it
appear :-)
I have just done the following:
- Downloaded the 4.1 20050227 snapshot onto a ia-64 Linux box
- untarred it
$ mkdir gcc-bin
$ cd gcc-bin/
$ ../gcc-4.1-20050227/configure --prefix=$HOME --enable-languages="c,f95"
$ make -j2 bootstrap
$ make install
Then, I get:
$ gcc -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: ../gcc-4.1-20050227/configure --prefix=/home/zfkts
--enable-languages=c,f95
Thread model: posix
gcc version 4.1.0 20050227 (experimental)
$ 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 -O3 -fdump-tree-optimized -S c-div.c
$ cat c-div.c.t65.optimized
;; Function main (main)
Analyzing Edge Insertions.
main ()
{
float SR.12;
float SR.11;
float SR.10;
float SR.9;
float c$imag;
float c$real;
float SR.6;
float SR.5;
float SR.4;
float SR.3;
float D.2255;
float D.2254;
float D.2253;
float D.2252;
float D.2251;
float D.2250;
float D.2249;
float D.2248;
float D.2247;
float D.2246;
float D.2245;
float D.2244;
float D.2243;
float D.2242;
float D.2241;
float D.2240;
float D.2239;
float D.2238;
float D.2237;
float D.2236;
float D.2233;
float D.2232;
float D.2231;
float D.2230;
float D.2229;
float D.2228;
complex float c;
complex float b;
float a;
double D.2225;
double D.2224;
float D.2223;
double D.2222;
float D.2221;
complex float c.2;
complex float c.1;
int D.2218;
complex float D.2217;
complex float D.2216;
float a.0;
<bb 0>:
foo (&a, &b);
SR.4 = a;
D.2228 = REALPART_EXPR <b>;
D.2229 = IMAGPART_EXPR <b>;
if (ABS_EXPR <SR.4> < 0.0) goto <L1>; else goto <L2>;
<L1>:;
D.2238 = SR.4 / 0.0;
D.2240 = SR.4 * D.2238 + 0.0;
c$real = (D.2229 + D.2228 * D.2238) / D.2240;
c$imag = (D.2229 * D.2238 - D.2228) / D.2240;
goto <bb 3>;
<L2>:;
D.2247 = 0.0 / SR.4;
D.2249 = SR.4 + D.2247 * 0.0;
c$real = (D.2228 + D.2229 * D.2247) / D.2249;
c$imag = (D.2229 - D.2228 * D.2247) / D.2249;
<bb 3>:
return (double) c$real + (double) c$imag < 0.0;
}
Anything more I can do to test this?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19953
More information about the Gcc-bugs
mailing list