[llvm-bugs] [Bug 24859] New: Floating point constants are not deterministic across platforms

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 17 09:06:00 PDT 2015


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

            Bug ID: 24859
           Summary: Floating point constants are not deterministic across
                    platforms
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ed at 80386.nl
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 14896
  --> https://llvm.org/bugs/attachment.cgi?id=14896&action=edit
Tarball with testcase and output

If I install exactly the same version of Clang (3.7.0-RELEASE) on Mac OS X,
FreeBSD and Linux, all targeting the same platform (x86_64-unknown-cloudabi)
and build the same source file at different optimization levels, I get
different results. This bug is similar in nature to bug 24734, but the root
cause is different. My suspicion is that this is related to FPU rounding modes.

Attached is a tarball that contains a C source file, foo.c, that is a reduced
testcase based on libspeex's vbr.c. This testcase has been built on Mac OS X,
FreeBSD and Linux, using different optimization modes. As you can see, anything
above -O0 yields different results.

-- 
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/20150917/8324c09d/attachment.html>


More information about the llvm-bugs mailing list