<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 frontend command failed with exit code 70 when compiling BearSSL"
   href="https://bugs.llvm.org/show_bug.cgi?id=36060">36060</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang frontend command failed with exit code 70 when compiling BearSSL
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>alexej.h@xiphos.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19726" name="attach_19726" title="Source code and shell script mentioned in the error message.">attachment 19726</a> <a href="attachment.cgi?id=19726&action=edit" title="Source code and shell script mentioned in the error message.">[details]</a></span>
Source code and shell script mentioned in the error message.

Clang crashes when compiling BearSSL src/hash/ghash_pclmul.c (commit e51143d).

Tested on the following platforms:

- Windows 10 x64 WSL based on Ubuntu 16.04.3 LTS (LLVM 5.0.1)
- Ubuntu 16.04.3 LTS x64 (LLVM 5.0.1 and LLVM trunk r323185)
- FreeBSD 12.0-CURRENT r327691 (LLVM 5.0.1)

Here is the compiler output (mentioned files are attached to this report):

[154/245] Building C object
CMakeFiles/net.dir/src/bearssl/src/hash/ghash_pclmul.c.o
FAILED: /opt/llvm/bin/clang -DNET_USE_EPOLL=1 -I../../../src
-I../../../src/bearssl/inc -I../../../src/bearssl/src -I../../../include -g  
-std=c11 -MD -MT CMakeFiles/net.dir/src/bearssl/src/hash/ghash_pclmul.c.o -MF
CMakeFiles/net.dir/src/bearssl/src/hash/ghash_pclmul.c.o.d -o
CMakeFiles/net.dir/src/bearssl/src/hash/ghash_pclmul.c.o   -c
../../../src/bearssl/src/hash/ghash_pclmul.c
fatal error: error in backend: Cannot select: 0x68150b0: v16i8 = X86ISD::PSHUFB
0x6814960, 0x6814bd0
  0x6814960: v16i8,ch = CopyFromReg 0x674eaf8, Register:v16i8 %123
    0x6814828: v16i8 = Register %123
  0x6814bd0: v16i8,ch = CopyFromReg 0x674eaf8, Register:v16i8 %124
    0x6814a98: v16i8 = Register %124
In function: br_ghash_pclmul
clang-7.0: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 7.0.0 (trunk 323185)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/llvm/bin
clang-7.0: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-7.0: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-7.0: note: diagnostic msg: /tmp/ghash_pclmul-59da01.c
clang-7.0: note: diagnostic msg: /tmp/ghash_pclmul-59da01.sh
clang-7.0: note: diagnostic msg:

********************
[154/245] Building C object CMakeFiles/net.dir/src/bearssl/src/rand/sysrng.c.o
ninja: build stopped: subcommand failed.
makefile:33: recipe for target 'debug' failed
make: *** [debug] Error 1</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>