delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/08/22/06:15:19

Date: Sun, 22 Aug 1999 11:09:10 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Andris Pavenis <pavenis AT lanet DOT lv>
cc: djgpp-workers AT delorie DOT com
Subject: Re: optimization bug in gcc-2.95 (fwd)
Message-ID: <Pine.SUN.3.91.990822110525.6405K-100000@is>
MIME-Version: 1.0
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 <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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019