brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 92c0777 Raw
65 lines · plain
1; Namelist is a fortran feature, this test checks whether DW_TAG_namelist and2; DW_TAG_namelist_item attributes are emitted correctly.3;4; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu %s -filetype=obj -o %t.o5; RUN: llvm-dwarfdump %t.o | FileCheck %s6;7; CHECK: [[ITEM1:0x.+]]:       DW_TAG_variable8; CHECK:                          DW_AT_name  ("a")9; CHECK: [[ITEM2:0x.+]]:       DW_TAG_variable10; CHECK:                          DW_AT_name  ("b")11; CHECK: DW_TAG_namelist12; CHECK:    DW_AT_name  ("nml")13; CHECK: DW_TAG_namelist_item14; CHECK:    DW_AT_namelist_item ([[ITEM1]])15; CHECK: DW_TAG_namelist_item16; CHECK:    DW_AT_namelist_item ([[ITEM2]])17;18; generated from19;20; program main21;22;  integer :: a=1, b23;  namelist /nml/ a, b24;25;  a = 1026;  b = 2027;  Write(*,nml)28;29; end program main30 31source_filename = "namelist.ll"32 33define void @MAIN_() !dbg !2 {34L.entry:35  %b_350 = alloca i32, align 436  call void @llvm.dbg.declare(metadata ptr %b_350, metadata !12, metadata !DIExpression()), !dbg !1337  call void @llvm.dbg.value(metadata i32 1, metadata !14, metadata !DIExpression()), !dbg !1338  ret void, !dbg !1739}40 41declare void @llvm.dbg.declare(metadata, metadata, metadata)42declare void @llvm.dbg.value(metadata, metadata, metadata)43 44!llvm.module.flags = !{!10, !11}45!llvm.dbg.cu = !{!4}46 47!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression(DW_OP_plus_uconst, 120))48!1 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 3, type: !9, isLocal: true, isDefinition: true)49!2 = distinct !DISubprogram(name: "main", scope: !4, file: !3, line: 1, type: !7, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !4)50!3 = !DIFile(filename: "namelist.f90", directory: "/dir")51!4 = distinct !DICompileUnit(language: DW_LANG_Fortran90, file: !3, producer: " F90 Flang - 1.5 2017-05-01", isOptimized: false, flags: "'+flang -g namelist.f90 -S -emit-llvm'", runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5, nameTableKind: None)52!5 = !{}53!6 = !{!0}54!7 = !DISubroutineType(cc: DW_CC_program, types: !8)55!8 = !{null}56!9 = !DIBasicType(name: "integer", size: 32, align: 32, encoding: DW_ATE_signed)57!10 = !{i32 2, !"Dwarf Version", i32 4}58!11 = !{i32 2, !"Debug Info Version", i32 3}59!12 = !DILocalVariable(name: "b", scope: !2, file: !3, line: 3, type: !9)60!13 = !DILocation(line: 0, scope: !2)61!14 = distinct !DILocalVariable(scope: !2, file: !3, line: 2, type: !15, flags: DIFlagArtificial)62!15 = !DICompositeType(tag: DW_TAG_namelist, name: "nml", scope: !2, file: !3, elements: !16)63!16 = !{!1, !12}64!17 = !DILocation(line: 10, column: 1, scope: !2)65