From owner-freebsd-stable Sun Apr 9 7: 7:17 2000 Delivered-To: freebsd-stable@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id F24FD37B7A7 for ; Sun, 9 Apr 2000 07:07:14 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com (p24-dn01kiryunisiki.gunma.ocn.ne.jp [211.0.245.25]) by peach.ocn.ne.jp (8.9.1a/OCN/) with ESMTP id XAA05888; Sun, 9 Apr 2000 23:07:03 +0900 (JST) Message-ID: <38F08E92.8E1016C4@newsguy.com> Date: Sun, 09 Apr 2000 23:07:14 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: Randall Hopper Cc: stable@FreeBSD.ORG Subject: Re: float-to-double core dump on 3.4R References: <20000408193053.A3689@ipass.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Randall Hopper wrote: > > #include > > 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