https://bugs.llvm.org/show_bug.cgi?id=34325

            Bug ID: 34325
           Summary: Invalid reference to a DIType crashes the verifier
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: dav...@freebsd.org
          Reporter: dav...@freebsd.org
                CC: apra...@apple.com, dblai...@gmail.com,
                    llvm-bugs@lists.llvm.org, r...@google.com

@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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to