Subject: gcc -mieee-with-inexact on ev67 gives wrong results
From: Major A (andras@users.sourceforge.net)
Date: Thu Apr 19 2001 - 03:05:49 PDT
Hi,
I tried to run the following test program on an alpha ev67 (a Nautilus
running debian potato with linux-2.2.17, gcc-2.95.2):
#include <stdio.h>
int main (int argc, char *argv[])
{
double a, b, c;
a = 1.;
b = 3.;
c = a/b;
fprintf (stderr, "%g / %g = %g\n", a, b, c);
}
Whenever the -mieee-with-inexact flag is set when compiling with gcc,
the program gives an incorrect result (c=0.25 instead of 0.333333). I
wasn't able to reproduce this behaviour with either g77 or the Compaq
compilers (fort, ccc), setting the appropriate option.
The hardware (mainboard+cpu) of the computer has been changed
recently, so that is probably not the problem.
I suspect that this is not a glibc problem because setting the
-D_IEEE_FP and -D_IEEE_FP_INEXACT flags without -mieee-with-inexact
did not produce the wrong result.
Currently, I have no access to any other ev67. All other alphas I have
access to (ev4, ev45, ev56) give correct results.
Has anyone else had similar problems? Is this really a gcc bug? Any
input is greatly appreciated.
Andras
===========================================================================
Major Andras
e-mail: andras@users.sourceforge.net
www: http://andras.webhop.org/
===========================================================================
-- To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
This archive was generated by hypermail 2a22 : Sat May 05 2001 - 06:18:16 PDT