<html>
    <head>
      <base href="http://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 --- - Assertion"
   href="http://llvm.org/bugs/show_bug.cgi?id=19767">19767</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>C++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jonathan.sauer@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=12520" name="attach_12520" title="Log of clang run">attachment 12520</a> <a href="attachment.cgi?id=12520&action=edit" title="Log of clang run">[details]</a></span>
Log of clang run

The following code crashes clang r209002 when being compiled with -g:

template <bool>
struct enable_if { using type = void; };

template <typename L, typename enable_if<true>::type* = nullptr>
static void testVoidIf(L&&) { }

int main()
{
    testVoidIf([]() {});
}


This results in (full log attached):

% ~/LLVM/build/Release+Asserts/bin/clang -std=c++11 -g clang.cpp
Assertion failed: (DTy.getTag() == dwarf::DW_TAG_enumeration_type), function
isUnsignedDIType, file
/Users/rynnsauer/LLVM/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp, line 756.
0  clang                    0x000000010f41ee28
llvm::sys::PrintStackTrace(__sFILE*) + 40
1  clang                    0x000000010f41f324 SignalHandler(int) + 548
2  libsystem_platform.dylib 0x00007fff968f25aa _sigtramp + 26
3  libsystem_platform.dylib 000000000000000000 _sigtramp + 1769003632
4  clang                    0x000000010f41f0e6 abort + 22
5  clang                    0x000000010f41f0c1 __assert_rtn + 81
6  clang                    0x000000010ede1208
isUnsignedDIType(llvm::DwarfDebug*, llvm::DIType) + 280
7  clang                    0x000000010ede1144
isUnsignedDIType(llvm::DwarfDebug*, llvm::DIType) + 84


The code compiles successfully with r207835.</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>