This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Irix6 casting long double to double yields bogus results
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: aoliva at redhat dot com
- Cc: gcc-bugs at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Wed, 29 Jan 2003 12:51:09 -0500 (EST)
- Subject: Irix6 casting long double to double yields bogus results
Alex,
I've been running some tests on irix6 floating point and noticed a
problem. Casting from long double to double seems to be broken now.
Thoughts?
Thanks,
--Kaveh
%cat foo.c
#include <stdio.h>
int main()
{
long double a = 1234.5678L, b = 1234.5678L;
double c = 1234.5678;
printf ("%f %Lf %f\n", (double) a, b, c);
return 0;
}
%gcc -v
Reading specs from /var/tmp/gcc-testing/branch/build/gcc/specs
Configured with: ../egcc-3.3-CVS20030129/configure --verbose
--enable-languages=c,objc,c++,f77,java
Thread model: single
gcc version 3.3 20030129 (prerelease)
%gcc -Wformat foo.c
%./a.out
1834810029.000000 1234.567800 1234.567800