Subject: port-alpha/18769: IEEE FP rounding bug NetBSD/alpha
To: None <>
From: None <>
List: netbsd-bugs
Date: 10/22/2002 12:17:38
>Number:         18769
>Category:       port-alpha
>Synopsis:       IEEE FP rounding bug NetBSD/alpha
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 22 12:18:00 PDT 2002
>Originator:     Jason R Thorpe
>Release:        NetBSD 1.6I
Wasabi Systems, Inc.
System: NetBSD 1.6I NetBSD 1.6I (FRAU-FARBISSINA) #149: Sat Oct 12 12:39:17 PDT 2002 alpha
Architecture: alpha
Machine: alpha
	NetBSD/alpha appears to have an IEEE FP rounding bug in the
	kernel FP completion code.  This bug causes failures in the
	GCC 3.3 testsuite.

	Compile the following program with "cc -mieee".  The optimization
	level is irrelevant.

d (unsigned long long k)
  double x;

  x = (double) k;
  return x;

main (int argc, char *argv[])
  unsigned long long k;
  double x;

  k = 0x8693ba6d7d220401ULL;
  x = d (k);
  k = (unsigned long long) x;
  if (k != 0x8693ba6d7d220800ULL)
    abort ();

	This code is taken from the relevant GCC testcase.  The
	testcase passes when compiled *without* "cc -mieee".

	Not known at this time.  (More analysis of the problem needs
	to be done.)