Excess precision problem on IA-64

Eric Botcazou ebotcazou@adacore.com
Thu Oct 27 18:09:00 GMT 2005


Hi,

We have run into an excess precision problem on IA-64, similar to the infamous 
problem on IA-32.  A C testcase is attached.

botcazou@taff:~/EA26-004> gcc -v
Using built-in specs.
Target: ia64-sgi-linux-gnu
Configured with: /home01/botcazou/cvs/gcc/configure ia64-sgi-linux-gnu 
--prefix=/nile.build/botcazou/fsf/install_ia64 --disable-nls 
--disable-libmudflap --disable-checking --enable-languages=c,c++
Thread model: posix
gcc version 4.1.0 20051024 (experimental)
botcazou@taff:~/EA26-004> gcc -o t t.c
botcazou@taff:~/EA26-004> ./t
botcazou@taff:~/EA26-004> gcc -o t t.c -O
botcazou@taff:~/EA26-004> ./t
Aborted

The bottom line is that:

  fmpy.s f8 = f8, f15
  fma.s f8 = f11, f12, f8

doesn't always give 0.0 in f8 when f8 = f15 = f11 = -f12, because the
computations are done in "infinite precision" and only rounded at the end.


What should we do about that?  Conditionalize the combined FP operations on 
-ffast-math or something along these lines?

Thanks in advance.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.c
Type: text/x-csrc
Size: 812 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20051027/d53045cd/attachment.bin>


More information about the Gcc mailing list