<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 --- - clang 3.5.2 and later miscompiles llvm-gcc"
   href="https://llvm.org/bugs/show_bug.cgi?id=23183">23183</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang 3.5.2 and later miscompiles llvm-gcc
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.6
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>howarth.mailing.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The clang compilers from 3.5.2 and later miscompile the legacy llvm-gcc code
from Apple's open source repo. The llvm-gcc bootstrap (tested with the
llvm-gcc42 fink packaging) can be restore with...

sed -i '1s/^/#pragma clang optimize off\n/'
./llvmCore/lib/CodeGen/MachineSSAUpdater.cpp
sed -i '1s/^/#pragma clang optimize off\n/'
./llvmCore/lib/Transforms/Utils/SSAUpdater.cpp

Compiling the files with -O1 is insufficient to remove the miscompilation and
-O0 is required. Disabling vectorization via the pragma statement likewise is
insufficient to eliminate the miscompilation of the code. 
    Do we have any pragma statements that would disable specific optimizations
enabled in going from -O0 to -O1?

Note that Apple clang 6.0 (based on 3.5svn) works but Apple clang 6.1 (based on
3.6svn) is broken.</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>