Recommit r310809 with a fix for the spill problem
[llvm-core.git] / test / Verifier / fragment.ll
blobed5df89cb317d4709d5e8e5fdec8a77133fb9b31
1 ; RUN: not opt -S <%s 2>&1| FileCheck %s
3 ; CHECK: fragment is larger than or outside of variable
4 ; CHECK: !DIGlobalVariableExpression(var: ![[VAR:[0-9]+]],
5 ; CHECK-SAME:                        expr: !DIExpression(DW_OP_LLVM_fragment, 0, 64))
6 ; CHECK: ![[VAR]] = !DIGlobalVariable(name: "g"
8 @g = common global i32 0, align 4, !dbg !0
10 !llvm.dbg.cu = !{!1}
11 !llvm.module.flags = !{!6, !7}
13 !0 = !DIGlobalVariableExpression(var: !3, expr: !DIExpression(DW_OP_LLVM_fragment, 0, 64))
14 !1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, emissionKind: FullDebug)
15 !2 = !DIFile(filename: "a.c", directory: "/")
16 !3 = !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true)
17 !5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
18 !6 = !{i32 2, !"Dwarf Version", i32 4}
19 !7 = !{i32 2, !"Debug Info Version", i32 3}