<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 - crash in 'Function Pass Manager' when X86TargetLowering"
   href="https://bugs.llvm.org/show_bug.cgi?id=41724">41724</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>crash in 'Function Pass Manager' when X86TargetLowering
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>7.0
          </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>libclang
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tesch1@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>clang version 7.0.1 (Fedora 7.0.1-6.fc29)

Apologies for not minimizing the test case!  I dont have time to learn the
tools, hopefully it's not too much trouble for yall.

I saw another bug that looked similar but now I cant find it.  Attached .tbz
has full test case (only 12 MB source file!)

Here's a snippet of the crash:

3.      Running pass 'Function Pass Manager' on module
'/home/rsanchez/src/cppduals/tests/test_1.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_Z5expm4IN5Eigen6MatrixIN5duals4dualIfEELi2ELi2ELi0ELi2ELi2EEES5_ET0_RKNS0_9EigenBaseIT_EENS8_10RealScalarE'
#0 0x00007fd2caf7b09e llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/lib64/libLLVM-7.so+0x9b409e)
#1 0x00007fd2caf79554 llvm::sys::RunSignalHandlers()
(/lib64/libLLVM-7.so+0x9b2554)
#2 0x00007fd2caf796d5 (/lib64/libLLVM-7.so+0x9b26d5)
#3 0x00007fd2ca5b8070 __restore_rt (/lib64/libpthread.so.0+0x13070)
#4 0x00007fd2ccd86f02 (/lib64/libLLVM-7.so+0x27bff02)
#5 0x00007fd2cce08c19 (/lib64/libLLVM-7.so+0x2841c19)
#6 0x00007fd2cce13ce1 (/lib64/libLLVM-7.so+0x284cce1)
#7 0x00007fd2cce230e1 llvm::X86TargetLowering::LowerOperation(llvm::SDValue,
llvm::SelectionDAG&) const (/lib64/libLLVM-7.so+0x285c0e1)
#8 0x00007fd2cb4b50f9 (/lib64/libLLVM-7.so+0xeee0f9)
#9 0x00007fd2cb4b8e00 llvm::SelectionDAG::Legalize()
(/lib64/libLLVM-7.so+0xef1e00)
#10 0x00007fd2cb5d4a01 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/lib64/libLLVM-7.so+0x100da01)
#11 0x00007fd2cb5da661
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/lib64/libLLVM-7.so+0x1013661)


Here's the top of the generated bug report .sh:  (NOTABLY, removing
-march=native stops it from crashing.)


# Crash reproducer for clang version 7.0.1 (Fedora 7.0.1-6.fc29)
# Driver args: "--driver-mode=g++" "-D" "HAVE_BLAS" "-D" "OPT_FLAGS= -g -Wall
-Wpedantic" "-I" "/home/rsanchez/src/cppduals" "-I"
"/home/rsanchez/src/cppduals/clang/thirdparty/root/include" "-I"
"/home/rsanchez/src/cppduals/clang/thirdparty/eigenX/src/eigenX" "-I"
"/home/rsanchez/src/cppduals/clang/thirdparty/eigen-expokitX/src/eigen-expokitX"
"-I" "/home/rsanchez/src/cppduals/clang/root/include" "-isystem"
"/home/rsanchez/src/cppduals/clang/tests/googletest-prefix/src/googletest/googletest/include"
"-g" "-Wall" "-Wpedantic" "-O2" "-g" "-D" "NDEBUG" "-mavx" "-O3"
"-march=native" "-funroll-loops" "-std=c++11" "-o"
"CMakeFiles/test_1.dir/test_1.cpp.o" "-c"
"/home/rsanchez/src/cppduals/tests/test_1.cpp"


Attached file contains:
ls -l clang-crash
-rw-rw-r--. 1 rsanchez rsanchez     7877 May  3 10:29 console.txt
-rw-rw-r--. 1 rsanchez rsanchez 12132280 May  3 10:28 test_1-743923.cpp
-rw-rw-r--. 1 rsanchez rsanchez     7663 May  3 10:28 test_1-743923.sh</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>