Bug 16423 - [powerpc] math-float, math-double failing logb_downward test with negative/positive zero difference on ppc32
Summary: [powerpc] math-float, math-double failing logb_downward test with negative/po...
Status: RESOLVED DUPLICATE of bug 887
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: 2.19
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-09 19:08 UTC by Brooks Moses
Modified: 2015-10-01 21:51 UTC (History)
0 users

See Also:
Host: powerpc*-*-*
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brooks Moses 2014-01-09 19:08:17 UTC
This is failing with GLIBC trunk as of 10am PST on 2014-01-09.

Configure with "../glibc/configure --prefix=/usr CC='gcc -m32' CXX='g++ -m32' --target=powerpc32-unknown-linux-gnu --build=powerpc32-unknown-linux-gnu --host=powerpc32-unknown-linux-gnu" on an IBM Power7; run "make" and "make check".

I'm seeing failures in both math/test-float and math/test-double, with essentially identical test-*.out outputs.  The contents of test-float.out are included below.  This bug report is for the logb_downward failure (which is that it's producing a negative zero where it should be producing a positive zero); I've filed the llrint failure separately.

----
testing float (without inline functions)
Failure: Test: logb_downward (1.000e+0)
Result:
 is:         -0.00000000000000000000e+00  -0x0.00000000000000000000p+0
 should be:   0.00000000000000000000e+00   0x0.00000000000000000000p+0
 difference:  0.00000000000000000000e+00   0x0.00000000000000000000p+0
 ulp       :  0.0000
 max.ulp   :  0.0000
Failure: llrint (2097151.0): Exception "Inexact" set
Failure: llrint (8388608.0): Exception "Inexact" set
Failure: llrint (16777216.0): Exception "Inexact" set
Failure: llrint (4503601774854144.0): Exception "Inexact" set
Failure: llrint_tonearest (2097151.0): Exception "Inexact" set
Failure: llrint_tonearest (8388608.0): Exception "Inexact" set
Failure: llrint_tonearest (16777216.0): Exception "Inexact" set
Failure: llrint_tonearest (4503601774854144.0): Exception "Inexact" set
Failure: llrint_towardzero (2097151.0): Exception "Inexact" set
Failure: llrint_towardzero (8388608.0): Exception "Inexact" set
Failure: llrint_towardzero (16777216.0): Exception "Inexact" set
Failure: llrint_towardzero (4503601774854144.0): Exception "Inexact" set
Failure: llrint_downward (2097151.0): Exception "Inexact" set
Failure: llrint_downward (8388608.0): Exception "Inexact" set
Failure: llrint_downward (16777216.0): Exception "Inexact" set
Failure: llrint_downward (4503601774854144.0): Exception "Inexact" set
Failure: llrint_upward (2097151.0): Exception "Inexact" set
Failure: llrint_upward (8388608.0): Exception "Inexact" set
Failure: llrint_upward (16777216.0): Exception "Inexact" set
Failure: llrint_upward (4503601774854144.0): Exception "Inexact" set
Failure: nexttoward (qNaN, 1.1): Exception "Inexact" set

Test suite completed:
  10843 test cases plus 10244 tests for exception flags and
    10244 tests for errno executed.
  22 errors occurred.
Comment 1 Brooks Moses 2014-01-09 19:24:00 UTC
FWIW, this is also failing in math-ldouble.
Comment 2 Brooks Moses 2014-01-09 19:27:30 UTC
...and this is failing in the test-ifloat, test-idouble, test-ildoubl inline variants as well.
Comment 3 Brooks Moses 2014-01-09 19:55:03 UTC
It turns out that this is probably a duplicate of bug 887, though I'll let someone else confirm before closing it.
Comment 4 joseph@codesourcery.com 2014-01-09 21:02:32 UTC
On Thu, 9 Jan 2014, brooks at gcc dot gnu.org wrote:

> I'm seeing failures in both math/test-float and math/test-double, with
> essentially identical test-*.out outputs.  The contents of test-float.out are
> included below.  This bug report is for the logb_downward failure (which is
> that it's producing a negative zero where it should be producing a positive
> zero); I've filed the llrint failure separately.

The reason for bug 887 being closed was spurious (and it should not have 
been listed in NEWS as fixed for 2.16).  There was a GCC fix only for more 
recent Power processors.  I think the bug should probably be kept open for 
the point that glibc should work around the GCC bug (conditionally on a 
configure test for whether the code generated needs it, i.e. that it uses 
the problem arithmetic operations without modifying the rounding mode 
temporarily).  In addition, a GCC bug should be filed in GCC Bugzilla, if 
not already open, for the bad code generation for these conversions with 
-frounding-math.
Comment 5 Joseph Myers 2015-10-01 21:51:25 UTC
Closing as a duplicate of bug 887, which I have reopened.

*** This bug has been marked as a duplicate of bug 887 ***