Mail Archives: djgpp-workers/1999/08/22/06:15:19
Could someone please see if this behavior of GCC 2.95 (is it new?)
affects the libm functions nan() and nanf()? They use a union of an FP
and an integer variable to generate a NaN. One symptom of a problem
would be if ``printf ("%+f", nan());'' prints "-NaN", not "+NaN".
Of course, to see if a problem exists, you would need to build the v2.03
alpha with GCC 2.95.
---------- Forwarded message ----------
Date: Thu, 19 Aug 1999 17:01:39 -0600
From: Jeffrey A Law <law AT cygnus DOT com>
To: Blair Kelly III <bfkelly AT afterlife DOT ncsc DOT mil>
Cc: gcc-bugs AT gcc DOT gnu DOT org
Subject: Re: optimization bug in gcc-2.95
In message <199908191335 DOT JAA07611 AT hades>you write:
> Kind gcc gurus,
> This C program demonstrates an optimazation bug in the
> GNU gcc-2.95 compiler on a sparc running SunOS5.6.
Nope. Your program violates ANSI C aliasing rules.
> long p1;
> double x = ((double) 10) * ((double) 10);
> double t = x+(4503599627370496.0); /* 2^52 */
> long *lo = (long *)&t;
You can not reference the same memory location using two types like
that.
jeff
- Raw text -