This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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 testsuite/19206] New: The math util test for nans uses undefined behavor.


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

            Bug ID: 19206
           Summary: The math util test for nans uses undefined behavor.
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: brooks at gcc dot gnu.org
  Target Milestone: ---

Copying this out of an internal Google bug that's been mouldering untouched in
our tracker for a while, in case it's relevant for someone else:

The math util test for nans uses the following:

    nans(T(-(0.0/0.0)), T(1.0/0.0), T(-1.0/0.0)),

and then uses a T of integer. The conversion is undefined behavior and the
actual value shouldn't be depended upon in the test. That the number we'd have
gotten is present in the right location is useful though I'm not quite sure how
I'd test that.



(Google ref. 13416127)

-- 
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]