* Falk Hueffner <[EMAIL PROTECTED]> [2006-05-21 09:49]:
> I can't see anything obviously wrong with the code. Is it possible
> for any of you to make a stand-alone testcase?
[EMAIL PROTECTED]:~/src/minc/4.2/minc-1.4/testdir$ cat test.c
#include <stdio.h>
int main() {
double dvalue = 0.0;
void *inptr;
unsigned long x = 143572;
inptr = &x;
printf("%e\n", dvalue);
dvalue = (double) *((double *) inptr);
printf("%e\n", dvalue);
dvalue = 65535.0 * dvalue -32768.0;
printf("%e\n", dvalue);
return 0;
}
[EMAIL PROTECTED]:~/src/minc/4.2/minc-1.4/testdir$ gcc-4.0 -g -O2 ./test.c ;
./a.out
0.000000e+00
7.093399e-319
-3.276800e+04
[EMAIL PROTECTED]:~/src/minc/4.2/minc-1.4/testdir$
/usr/lib/gcc-snapshot/bin/gcc -g -O2 ./test.c ; ./a.out
0.000000e+00
7.093399e-319
Floating point exception
[EMAIL PROTECTED]:~/src/minc/4.2/minc-1.4/testdir$
Ahh!!! Adding -mieee helps. So I guess all of this is because the
gcc-snapshot package doesn't activate -mieee by default on Alpha as
the gcc-4.0 package does.
--
Martin Michlmayr
http://www.cyrius.com/
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]