NetBSD Problem Report #48043

From njoly@thanos.sis.pasteur.fr  Wed Jul 10 11:15:49 2013
Return-Path: <njoly@thanos.sis.pasteur.fr>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 51CDB7199F
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 10 Jul 2013 11:15:49 +0000 (UTC)
Message-Id: <20130710111034.F197E24C3C@thanos.sis.pasteur.fr>
Date: Wed, 10 Jul 2013 13:10:34 +0200 (CEST)
From: njoly@pasteur.fr
Reply-To: njoly@pasteur.fr
To: gnats-bugs@NetBSD.org
Subject: IEEE FP issue with NANs
X-Send-Pr-Version: 3.95

>Number:         48043
>Category:       port-alpha
>Synopsis:       IEEE FP issue with NANs
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-alpha-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 10 11:20:00 +0000 2013
>Closed-Date:    Wed Oct 29 12:00:42 +0000 2014
>Last-Modified:  Wed Oct 29 12:00:42 +0000 2014
>Originator:     Nicolas Joly
>Release:        NetBSD 6.99.23
>Organization:
Insitut Pasteur
>Environment:
System: NetBSD thanos.sis.pasteur.fr 6.99.23 NetBSD 6.99.23 (GENERIC-$Revision: 1.353 $) #5: Sun Jul 7 15:32:41 CEST 2013 njoly@thanos.sis.pasteur.fr:/local/src/NetBSD/obj.alpha/sys/arch/alpha/compile/THANOS alpha
Architecture: alpha
Machine: alpha
>Description:
For quite some time now, i do see problems with NANs for IEEE FP.
No idea what going on, but they often become a value of 0.

njoly@thanos [~]> cat nan.c 
#include <math.h>
#include <stdio.h>

int main() {
  double d, r;

  d = NAN;
  printf("d %f\n", d);
  r = d + 0.0;
  printf("r %f\n", r);

  return 0; }

njoly@thanos [~]> cc -mieee -g -O2 -o nan nan.c    
njoly@thanos [~]> ./nan 
d 0.000000
r 0.000000

No problem if compiled without -mieee :

njoly@thanos [~]> cc -g -O2 -o nan nan.c 
njoly@thanos [~]> ./nan 
d nan
r nan

>How-To-Repeat:
Run the testcase ... see unexpected 0.0 results.
>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: njoly@NetBSD.org
State-Changed-When: Wed, 29 Oct 2014 12:00:42 +0000
State-Changed-Why:
Fixed. No more problem on -current.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.