<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 --- - Assembly parser breaks on certain comments"
   href="https://llvm.org/bugs/show_bug.cgi?id=28921">28921</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assembly parser breaks on certain comments
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.9
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tim.besard@elis.ugent.be
          </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>As of the assembly parser refactor in r27300 (D20009), clang doesn't parse the
following assembly file anymore:


##
#ifndef TRMMKERNEL
vaddpd 4, %xmm9, %xmm9;
vaddpd 6, %xmm8, %xmm8;
vaddpd 0, %xmm15, %xmm15;
vaddpd 2, %xmm14, %xmm14;
vaddpd 4, %xmm13, %xmm13;
vaddpd 6, %xmm12, %xmm12;
#endif
##


Bisected on the llvm-project repository, release build using CMake 3.6.1 +
Ninja on Debian Jessie if that would matter.


$ clang --version
clang version 3.8.1 (tags/RELEASE_381/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang -DTRMMKERNEL -c kernel.S
$ echo $?
0


$ clang-3.9 --version
clang version 3.9.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang-3.9 -DTRMMKERNEL -c kernel.S
kernel.S:1:1: error: unexpected token at start of statement
##
^


This is a test case reduced from a failure to compile OpenBLAS, as reported
here: <a href="https://github.com/xianyi/OpenBLAS/issues/942">https://github.com/xianyi/OpenBLAS/issues/942</a>
Using `-no-integrated-as` obviously bypasses the problem.

Some other occurrences of this bug, eg.
<a href="http://forum.xda-developers.com/showpost.php?p=67696651&postcount=170">http://forum.xda-developers.com/showpost.php?p=67696651&postcount=170</a></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>