<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 - Invalid reference to a DIType crashes the verifier"
   href="https://bugs.llvm.org/show_bug.cgi?id=34325">34325</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Invalid reference to a DIType crashes the verifier
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>DebugInfo
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>davide@freebsd.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>davide@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>aprantl@apple.com, dblaikie@gmail.com, llvm-bugs@lists.llvm.org, rnk@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>@bar = global i64 0, align 8, !dbg !0

!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!8}

!0 = !DIGlobalVariableExpression(var: !1)
!1 = !DIGlobalVariable(name: "c", scope: null, isLocal: false, isDefinition:
true, type: !6)
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3,
isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, retainedTypes:
!4, globals: !7)
!3 = !DIFile(filename: "a", directory: "")
!4 = !{!5}
!5 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !6, file: !3,
identifier: "patatino")
!6 = distinct !DISubprogram(name: "b", scope: null, isLocal: false,
isDefinition: true, isOptimized: false, unit: !2)
!7 = !{!0}
!8 = !{i32 2, !"Debug Info Version", i32 3}

$ ./opt pet.ll  -S
invalid type ref
!1 = !DIGlobalVariable(name: "c", scope: null, type: !2, isLocal: false,
isDefinition: true)
!2 = distinct !DISubprogram(name: "b", scope: null, isLocal: false,
isDefinition: true, isOptimized: false, unit: !3)
opt: ../include/llvm/IR/DebugInfoMetadata.h:78:
llvm::TypedDINodeRef<T>::TypedDINodeRef(const llvm::Metadata*) [with T =
llvm::DIType]: Assertion `(!MD || isa<T>(MD)) && "Expected valid type ref"'
failed.</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>