1;; This test checks DISubrange bounds for constants 2; REQUIRES: x86_64-linux 3 4; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s 5 6;; Test whether bounds are generated correctly. 7; CHECK-LABEL: DW_TAG_array_type 8; CHECK: DW_TAG_subrange_type 9; CHECK: DW_AT_lower_bound (-10) 10; CHECK-NEXT: DW_AT_upper_bound (10) 11; CHECK-NEXT: DW_AT_byte_stride (4) 12 13; ModuleID = 'fortsubrange.ll' 14source_filename = "fortsubrange.ll" 15 16define void @MAIN_() !dbg !5 { 17L.entry: 18 %"arr$sd1_349" = alloca [16 x i64], align 8 19 call void @llvm.dbg.declare(metadata ptr %"arr$sd1_349", metadata !8, metadata !DIExpression()), !dbg !13 20 ret void, !dbg !14 21} 22 23; Function Attrs: nounwind readnone speculatable willreturn 24declare void @llvm.dbg.declare(metadata, metadata, metadata) 25 26!llvm.module.flags = !{!0, !1} 27!llvm.dbg.cu = !{!2} 28 29!0 = !{i32 2, !"Dwarf Version", i32 4} 30!1 = !{i32 2, !"Debug Info Version", i32 3} 31!2 = distinct !DICompileUnit(language: DW_LANG_Fortran90, file: !3, producer: " F90 Flang - 1.5 2017-05-01", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !4, imports: !4) 32!3 = !DIFile(filename: "fortsubrange.f90", directory: "/dir") 33!4 = !{} 34!5 = distinct !DISubprogram(name: "main", scope: !2, file: !3, line: 1, type: !6, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !2) 35!6 = !DISubroutineType(cc: DW_CC_program, types: !7) 36!7 = !{null} 37!8 = !DILocalVariable(name: "arr", scope: !5, file: !3, type: !9) 38!9 = !DICompositeType(tag: DW_TAG_array_type, baseType: !10, size: 32, align: 32, elements: !11) 39!10 = !DIBasicType(name: "integer", size: 32, align: 32, encoding: DW_ATE_signed) 40!11 = !{!12} 41!12 = !DISubrange(lowerBound: -10, upperBound: 10, stride: 4) 42!13 = !DILocation(line: 0, scope: !5) 43!14 = !DILocation(line: 6, column: 1, scope: !5) 44