51 lines · plain
1;; This test checks Backward compatibility of DISubrange bounds2; REQUIRES: x86_64-linux3 4; RUN: llvm-dis -o - %s.bc | FileCheck %s5 6;; Test whether bounds are generated correctly.7; CHECK: !DISubrange(count: 15, lowerBound: 3)8; CHECK: !DISubrange(count: ![[NODE:[0-9]+]], lowerBound: 3)9; CHECK: ![[NODE]] = distinct !DILocalVariable10 11 12; ModuleID = 'fortsubrange.ll'13source_filename = "fortsubrange.ll"14 15define void @MAIN_() !dbg !10 {16L.entry:17 %.Z0640_333 = alloca i32*, align 818 %"arr$sd1_349" = alloca [16 x i64], align 819 call void @llvm.dbg.declare(metadata i32** %.Z0640_333, metadata !13, metadata !DIExpression(DW_OP_deref)), !dbg !1920 call void @llvm.dbg.declare(metadata [16 x i64]* %"arr$sd1_349", metadata !17, metadata !DIExpression(DW_OP_plus_uconst, 120)), !dbg !1921 ret void, !dbg !2022}23 24; Function Attrs: nounwind readnone speculatable willreturn25declare void @llvm.dbg.declare(metadata, metadata, metadata)26 27!llvm.module.flags = !{!0, !1}28!llvm.dbg.cu = !{!2}29 30!0 = !{i32 2, !"Dwarf Version", i32 4}31!1 = !{i32 2, !"Debug Info Version", i32 3}32!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: !5, globals: !4, imports: !4)33!3 = !DIFile(filename: "fortsubrange.f90", directory: "/dir")34!4 = !{}35!5 = !{!6}36!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 32, align: 32, elements: !8)37!7 = !DIBasicType(name: "integer", size: 32, align: 32, encoding: DW_ATE_signed)38!8 = !{!9}39!9 = !DISubrange(count: 15, lowerBound: 3)40!10 = distinct !DISubprogram(name: "main", scope: !2, file: !3, line: 1, type: !11, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !2)41!11 = !DISubroutineType(cc: DW_CC_program, types: !12)42!12 = !{null}43!13 = !DILocalVariable(name: "arr", scope: !10, file: !3, type: !14)44!14 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 32, align: 32, elements: !15)45!15 = !{!16}46!16 = !DISubrange(count: !17, lowerBound: 3)47!17 = distinct !DILocalVariable(scope: !10, file: !3, type: !18, flags: DIFlagArtificial)48!18 = !DIBasicType(name: "integer*8", size: 64, align: 64, encoding: DW_ATE_signed)49!19 = !DILocation(line: 0, scope: !10)50!20 = !DILocation(line: 6, column: 1, scope: !10)51