This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/22225] New: nearbyint arithmetic moved before feholdexcept


https://sourceware.org/bugzilla/show_bug.cgi?id=22225

            Bug ID: 22225
           Summary: nearbyint arithmetic moved before feholdexcept
           Product: glibc
           Version: 2.26
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---

In https://sourceware.org/ml/libc-alpha/2013-05/msg00722.html I remarked on the
possibility of arithmetic in various nearbyint implementations being scheduled
before feholdexcept calls, resulting in spurious "inexact" exceptions.

I'm now actually observing this occurring in glibc built for ARM with GCC 7 (in
fact, both copies of the same addition/subtraction sequence being combined and
moved out before the conditionals and feholdexcept/fesetenv pairs), resulting
in test failures.

FAIL: math/test-double-finite-lrint
FAIL: math/test-double-finite-nearbyint
FAIL: math/test-double-lrint
FAIL: math/test-double-nearbyint
FAIL: math/test-float-finite-nearbyint
FAIL: math/test-float-nearbyint

Testing a patch.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]