[Bug middle-end/38848] Optimizer -O2 doesn't work on linear algebra code on double data type

2009-01-15 Thread rbenedik at fsmat dot htu dot tuwien dot ac dot at


--- Comment #4 from rbenedik at fsmat dot htu dot tuwien dot ac dot at  
2009-01-15 12:12 ---
I traced the error back to a iteration scheme which is not stable when optmized
with -O2. Sorry this was my fault, so theres no Bug in -O2:

DTYPE FTYPE(SQUARE_ROOT)(DTYPE A)
{
 DTYPE X_N1;
 DTYPE X_N2;

 X_N1=A;

 while(1)
 {
  X_N2 = (DTYPE)(1/2.0) * (X_N1+A/X_N1);
  if(X_N2 == X_N1) break;
  X_N1 = X_N2;
 }

 return X_N2;
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38848



[Bug middle-end/38848] Optimizer -O2 doesn't work on linear algebra code on double data type

2009-01-15 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2009-01-15 14:35 ---
Thus invalid.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38848



[Bug middle-end/38848] Optimizer -O2 doesn't work on linear algebra code on double data type

2009-01-14 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|major   |normal
  Component|c   |middle-end


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38848



[Bug middle-end/38848] Optimizer -O2 doesn't work on linear algebra code on double data type

2009-01-14 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2009-01-14 21:05 ---
I cannot even compile or link this in any obvious way.

gcc -o t t.c -DDOUBLE
/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
/tmp/ccNVE5Zw.o: In function `LEAST_SQUARE_QR_d':
t.c:(.text+0x67): undefined reference to `COPY_d'
t.c:(.text+0x80): undefined reference to `COPY_d'
t.c:(.text+0x111): undefined reference to `SQUARE_ROOT_d'
t.c:(.text+0x1ae): undefined reference to `SQUARE_ROOT_d'
t.c:(.text+0x5db): undefined reference to `SQUARE_ROOT_d'
t.c:(.text+0x678): undefined reference to `SQUARE_ROOT_d'
collect2: ld returned 1 exit status


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38848



[Bug middle-end/38848] Optimizer -O2 doesn't work on linear algebra code on double data type

2009-01-14 Thread rbenedik at fsmat dot htu dot tuwien dot ac dot at


--- Comment #2 from rbenedik at fsmat dot htu dot tuwien dot ac dot at  
2009-01-14 21:50 ---
I tried to make a single file from the code but the bug does not show up there.
You can download the software at:

http://fsmat.htu.tuwien.ac.at/~rbenedik/gauss-2.06.tar

Run 

make clean; make
and run

lsq_perf_d 10

in the benchmark directory; float and extended do work on the System: e5200
@2.5 Ghz Fedora 10.0 64 bit double does not.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38848



[Bug middle-end/38848] Optimizer -O2 doesn't work on linear algebra code on double data type

2009-01-14 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2009-01-14 22:25 ---
You need to do some work to reduce this to a testcase.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38848