<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Floating point constants are not deterministic across platforms"
   href="https://llvm.org/bugs/show_bug.cgi?id=24859">24859</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Floating point constants are not deterministic across platforms
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.7
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ed@80386.nl
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=14896" name="attach_14896" title="Tarball with testcase and output">attachment 14896</a> <a href="attachment.cgi?id=14896&action=edit" title="Tarball with testcase and output">[details]</a></span>
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 <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - LLVM/Clang 3.7.0 become undeterministic at >= -O1"
   href="show_bug.cgi?id=24734">bug 24734</a>, 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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>