This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 2592
  test-float fails on sparc Last modified: 2008-03-09 12:34:11
     Query page      Enter new bug
Bug#: 2592   Hardware:   Reporter: Jan Engelhardt <jengelh@gmx.de>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: Andreas Jaeger <aj@suse.de>   Target Milestone:  
Flags: Requestee:
  backport ()
  examined ()
  testsuite ()
Summary:
Keywords:

Attachment Description Type Created Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 2592 depends on: Show dependency tree
Show dependency graph
Bug 2592 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2006-04-20 21:36
Host system: Debian unstable with GCC 4.1.0 compiling glibc 2.4-2006032009.tar.bz2


testing float (without inline functions)
Failure:Test: llrint_downward (-0.2) == -1
Result:
 is:         0
 should be:  -1
Failure:Test: llrint_upward (0.2) == 1
Result:
 is:         0
 should be:  1

Test suite completed:
  2811 test cases plus 2513 tests for exception flags executed.
  2 errors occurred.


I have found that a simple test program - built with the normal glibc that
Debian-unstable ships - won't work either:

#include <fenv.h>
#include <math.h>
#include <stdio.h>
int main(void) {
    printf("%d\n", fesetround(FE_DOWNWARD)); // says 0
    printf("%f\n", llrint(-.2L)); // says 0
}

Which makes me think whether this could be a limitation of the CPU? (UltraSPARC
II, codename per /proc/cpuinfo: "TI Blackbird")

------- Additional Comment #1 From Joseph Myers 2006-06-16 22:41 -------
I believe there is a generic bug in the C versions of lrint* and llrint*; the
same failures appear on MIPS64.  I am testing a patch.

------- Additional Comment #2 From Joseph Myers 2006-06-18 06:59 -------
Patch submitted: http://sourceware.org/ml/libc-alpha/2006-06/msg00069.html

------- Additional Comment #3 From Ulrich Drepper 2006-09-20 17:14 -------
Should be fixed in cvs.

------- Additional Comment #4 From Andreas Jaeger 2008-03-09 12:34 -------
*** Bug 5547 has been marked as a duplicate of this bug. ***

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In