From owner-freebsd-alpha Wed Jul 28 11:45:27 1999 Delivered-To: freebsd-alpha@freebsd.org Received: from tad.cetlink.net (tad.cetlink.net [209.198.2.10]) by hub.freebsd.org (Postfix) with ESMTP id 328861502C for ; Wed, 28 Jul 1999 11:45:24 -0700 (PDT) (envelope-from jeff@tad.cetlink.net) Received: (from jeff@localhost) by tad.cetlink.net (8.9.2/8.9.1) id OAA48360 for freebsd-alpha@freebsd.org; Wed, 28 Jul 1999 14:45:24 -0400 (EDT) (envelope-from jeff) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 28 Jul 1999 14:45:24 -0400 (EDT) Organization: CETLink.Net From: Jeff Wheat To: freebsd-alpha@freebsd.org Subject: 3.2-RELEASE problems IEEE Math Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi there. I am new to this list as recently installing 3.2 on my alphastation 250 4/266. I must start by saying it was amazingly simple to install considering I was using the serial console! Anyhow, I am attempting to compile a package that uses IEEE math and I am running into trouble. Here is the test program: #include #include int main(void){ double a; double b=22.0; double c; signal(SIGFPE,SIG_IGN); //# fpsetmask(0); a=0.0/0.0; c=b/a; if (!isnan(c)) return 1; c=a==c?1.0:0.0; if (c>0.0) return 1; c=a==c?1.0:0.0; if (c>0.0) return 1; c=a>c?1.0:0.0; if (c>0.0) return 1; c=a0.0) return 1; c=a>=c?1.0:0.0; if (c>0.0) return 1; c=a<=c?1.0:0.0; if (c>0.0) return 1; return 0; } Here are the results: alpha# gcc nantest.c -o nantest ; ./nantest ; echo $? 1 alpha# gcc nantest.c -O -o nantest ; ./nantest ; echo $? 0 alpha# gcc nantest.c -O1 -o nantest ; ./nantest ; echo $? 0 alpha# gcc nantest.c -O2 -o nantest ; ./nantest ; echo $? 0 alpha# gcc nantest.c -ieee -o nantest ; ./nantest ; echo $? 1 This seems odd that optimization would cause these differences. Can anyone suggest what the problem is? Best regards, Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message