Date: Sun, 22 Aug 1999 11:09:10 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Andris Pavenis cc: djgpp-workers AT delorie DOT com Subject: Re: optimization bug in gcc-2.95 (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com 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 To: Blair Kelly III 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