[llvm-bugs] [Bug 34098] New: [APFloat] DoubleAPFloat::isInteger would always trigger an assert.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 7 03:48:42 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34098

            Bug ID: 34098
           Summary: [APFloat] DoubleAPFloat::isInteger would always
                    trigger an assert.
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Support Libraries
          Assignee: unassignedbugs at nondot.org
          Reporter: edy.burt at gmail.com
                CC: llvm-bugs at lists.llvm.org

`DoubleAPFloat::isInteger` creates a zero `semPPCDoubleDoubleLegacy` APFloat
and then tries to add `Floats[0]` and `Floats[1]` to it, both of which are
always `semIEEEdouble`.

Addition (like the other binary operations) has an assert that the semantics
are identical so calling this method would always assert (if they're enabled),
but it's not even tested.

Also, I'd expect the correct implementation to be `Floats[0].isInteger() &&
Floats[1].isInteger()`.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170807/832e42f5/attachment.html>


More information about the llvm-bugs mailing list