Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Apr 2000 23:07:14 +0900
From:      "Daniel C. Sobral" <dcs@newsguy.com>
To:        Randall Hopper <aa8vb@ipass.net>
Cc:        stable@FreeBSD.ORG
Subject:   Re: float-to-double core dump on 3.4R
Message-ID:  <38F08E92.8E1016C4@newsguy.com>
References:  <20000408193053.A3689@ipass.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Randall Hopper wrote:
> 
>      #include <float.h>
> 
>      main()
>      {
>         float  f = FLT_MAX;
>         double d;
>         f = f * 2;
>         d = f;
>      }
> 
> Delete the "d=f" line and it doesn't core.  Put it in and it does
> (floating-point exception).
> 
> >From this it appears there may be a bug in the float-to-double promotion
> when f is Inf (or, at least I'd expect that f is Inf).
> 
> Any comments?  If not, I'll file the PR.

Sure. If you delete the last line, the compiler will optimize away f = f
* 2, I bet. Try with -O0 (that's oh-zero :).

-- 
Daniel C. Sobral			(8-DCS)
dcs@newsguy.com
dcs@freebsd.org
capo@zurichgnomes.bsdconspiracy.net

	The size of the pizza is inversely proportional to the intensity of the
hunger.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38F08E92.8E1016C4>