<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 - Bad code leads to unreachable in llvm::DIType *CGDebugInfo::CreateTypeNode(QualType Ty, llvm::DIFile *Unit)"
   href="https://bugs.llvm.org/show_bug.cgi?id=32028">32028</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Bad code leads to unreachable in llvm::DIType *CGDebugInfo::CreateTypeNode(QualType Ty, llvm::DIFile *Unit)
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Via "flacs"

Flags to generate (at least some) debug info are required for the unreachable
to execute. Related to r293207 (PR0091R3: Implement parsing support for using
templates as types).

[llvm-cmake-debug]% ./bin/clang --version    # Updated just now
clang version 5.0.0 (trunk 295714) (llvm/trunk 295716)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Users/filcab/work/llvm-cmake-debug/./bin
[llvm-cmake-debug]% cat a.cpp
template<typename T>
struct A
{
};

A a = A<int>();
[llvm-cmake-debug]% ./bin/clang -cc1 -triple x86_64-unknown-linux-gnu -S
-debug-info-kind=limited -std=c++1z -o /dev/null a.cpp
type should have been unwrapped!
UNREACHABLE executed at
/Users/filcab/work/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp:2657!
Stack dump:
0.      Program arguments: ./bin/clang -cc1 -triple x86_64-unknown-linux-gnu -S
-debug-info-kind=limited -std=c++1z -o /dev/null a.cpp
1.      <eof> parser at end of file
2.      a.cpp:6:3: LLVM IR generation of declaration 'a'
3.      a.cpp:6:3: Generating code for declaration 'a'
[1]    58227 abort      ./bin/clang -cc1 -triple x86_64-unknown-linux-gnu -S
-debug-info-kind=limited</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>