brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 0f348e8 Raw
64 lines · plain
1;; This test checks DISubrange bounds for DIVariable2; REQUIRES: x86_64-linux3 4; RUN: llc -mtriple=x86_64-unknown-linux-gnu %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s5 6;; Test whether bounds are generated correctly.7; CHECK: [[DIE1:0x.+]]:       DW_TAG_variable8; CHECK:                    DW_AT_location9; CHECK-SAME: DW_OP_plus_uconst 0x70, DW_OP_deref, DW_OP_lit4, DW_OP_mul10; CHECK: [[DIE2:0x.+]]:       DW_TAG_variable11; CHECK:                    DW_AT_location12; CHECK-SAME: DW_OP_plus_uconst 0x7813; CHECK: [[DIE3:0x.+]]:       DW_TAG_variable14; CHECK:                    DW_AT_location15; CHECK-SAME: DW_OP_plus_uconst 0x5016; CHECK:     DW_TAG_subrange_type17; CHECK:                  DW_AT_lower_bound     ([[DIE3]])18; CHECK-NEXT:              DW_AT_upper_bound     ([[DIE2]])19; CHECK-NEXT:              DW_AT_byte_stride     ([[DIE1]])20 21 22; ModuleID = 'fortsubrange.ll'23source_filename = "fortsubrange.ll"24 25define void @MAIN_() !dbg !5 {26L.entry:27  %.Z0640_333 = alloca ptr, align 828  %"arr$sd1_349" = alloca [16 x i64], align 829  call void @llvm.dbg.declare(metadata ptr %.Z0640_333, metadata !8, metadata !DIExpression(DW_OP_deref)), !dbg !1730  call void @llvm.dbg.declare(metadata ptr %"arr$sd1_349", metadata !13, metadata !DIExpression(DW_OP_plus_uconst, 80)), !dbg !1731  call void @llvm.dbg.value(metadata ptr %"arr$sd1_349", metadata !16, metadata !DIExpression(DW_OP_plus_uconst, 112, DW_OP_deref, DW_OP_constu, 4, DW_OP_mul)), !dbg !1732  call void @llvm.dbg.declare(metadata ptr %"arr$sd1_349", metadata !15, metadata !DIExpression(DW_OP_plus_uconst, 120)), !dbg !1733  ret void, !dbg !1834}35 36; Function Attrs: nounwind readnone speculatable willreturn37declare void @llvm.dbg.declare(metadata, metadata, metadata)38 39; Function Attrs: nounwind readnone speculatable willreturn40declare void @llvm.dbg.value(metadata, metadata, metadata)41 42!llvm.module.flags = !{!0, !1}43!llvm.dbg.cu = !{!2}44 45!0 = !{i32 2, !"Dwarf Version", i32 4}46!1 = !{i32 2, !"Debug Info Version", i32 3}47!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)48!3 = !DIFile(filename: "fortsubrange.f90", directory: "/dir")49!4 = !{}50!5 = distinct !DISubprogram(name: "main", scope: !2, file: !3, line: 1, type: !6, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !2)51!6 = !DISubroutineType(cc: DW_CC_program, types: !7)52!7 = !{null}53!8 = !DILocalVariable(name: "arr", scope: !5, file: !3, type: !9)54!9 = !DICompositeType(tag: DW_TAG_array_type, baseType: !10, size: 32, align: 32, elements: !11)55!10 = !DIBasicType(name: "integer", size: 32, align: 32, encoding: DW_ATE_signed)56!11 = !{!12}57!12 = !DISubrange(lowerBound: !13, upperBound: !15, stride: !16)58!13 = distinct !DILocalVariable(scope: !5, file: !3, type: !14, flags: DIFlagArtificial)59!14 = !DIBasicType(name: "integer*8", size: 64, align: 64, encoding: DW_ATE_signed)60!15 = distinct !DILocalVariable(scope: !5, file: !3, type: !14, flags: DIFlagArtificial)61!16 = distinct !DILocalVariable(scope: !5, file: !3, type: !14, flags: DIFlagArtificial)62!17 = !DILocation(line: 0, scope: !5)63!18 = !DILocation(line: 6, column: 1, scope: !5)64