Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / test / DebugInfo / subrange-missing-upperBound.ll
blob3483dd1a9f4ee8bde1897fc36aa611213d5532c4
1 ; RUN: %llc_dwarf %s -filetype=obj -o %t
2 ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
3 ; REQUIRES: object-emission
6 ; ModuleID = 'test.ll'
7 source_filename = "test.f90"
9 !llvm.module.flags = !{!1}
10 !llvm.dbg.cu = !{!2}
12 !1 = !{i32 2, !"Debug Info Version", i32 3}
13 !2 = distinct !DICompileUnit(language: DW_LANG_Fortran90, file: !3, emissionKind: FullDebug, retainedTypes: !5)
14 !3 = !DIFile(filename: "test.f90", directory: "dir")
15 !5 = !{!6, !10, !13}
16 !6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, elements: !8)
17 !7 = !DIBasicType(name: "integer", size: 32, align: 32, encoding: DW_ATE_signed)
18 !8 = !{!9}
19 !9 = !DISubrange(lowerBound: 2, stride: 16)
20 !10 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, elements: !11)
21 !11 = !{!12}
22 !12 = !DISubrange()
23 !13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, elements: !14)
24 !14 = !{!15}
25 !15 = !DIGenericSubrange(lowerBound: !16, stride: !17)
26 !16 = !DIExpression(DW_OP_push_object_address, DW_OP_plus_uconst, 48, DW_OP_deref)
27 !17 = !DIExpression(DW_OP_push_object_address, DW_OP_plus_uconst, 56, DW_OP_deref)
29 ; Test that debug info is generated correctly in the absence of 'count' and
30 ; 'upperBound' in DISubrange/DIGenericSubrange.
32 ; CHECK-LABEL: DW_TAG_subrange_type
33 ; CHECK-NEXT:   DW_AT_type
34 ; CHECK-NEXT:   DW_AT_lower_bound     (2)
35 ; CHECK-NEXT:   DW_AT_byte_stride     (16)
37 ; CHECK-LABEL: DW_TAG_subrange_type
38 ; CHECK-NEXT:   DW_AT_type
40 ; CHECK-LABEL: DW_TAG_generic_subrange
41 ; CHECK-NEXT:   DW_AT_type
42 ; CHECK-NEXT:   DW_AT_lower_bound     (DW_OP_push_object_address, DW_OP_plus_uconst 0x30, DW_OP_deref)
43 ; CHECK-NEXT:   DW_AT_byte_stride     (DW_OP_push_object_address, DW_OP_plus_uconst 0x38, DW_OP_deref)