15f75dcf5SChih-Ping Chen; RUN: llvm-as -o - %s | llvm-dis -o - | FileCheck %s 2*06a0ae65SVladislav Dzhidzhoev; CHECK: DIImportedEntity(tag: DW_TAG_imported_module, scope: !2, entity: ![[MOD:[0-9]+]], file: !3, line: 2) 3*06a0ae65SVladislav Dzhidzhoev; CHECK: ![[MOD]] = !DIModule(scope: !2, name: "external_module", isDecl: true) 45f75dcf5SChih-Ping Chen 55f75dcf5SChih-Ping Chen; ModuleID = 'em.f90' 65f75dcf5SChih-Ping Chensource_filename = "em.f90" 75f75dcf5SChih-Ping Chentarget datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 85f75dcf5SChih-Ping Chentarget triple = "x86_64-unknown-linux-gnu" 95f75dcf5SChih-Ping Chen 105f75dcf5SChih-Ping Chen@external_module_mp_dummy_ = available_externally global float 0.000000e+00, align 8, !dbg !0 115f75dcf5SChih-Ping Chen@0 = internal unnamed_addr constant i32 2 125f75dcf5SChih-Ping Chen 135f75dcf5SChih-Ping Chen; Function Attrs: noinline nounwind uwtable 145f75dcf5SChih-Ping Chendefine void @MAIN__() #0 !dbg !2 { 155f75dcf5SChih-Ping Chenalloca_0: 165f75dcf5SChih-Ping Chen %"var$1" = alloca [8 x i64], align 8 175f75dcf5SChih-Ping Chen %"use_external_module_$X" = alloca float, align 8 185f75dcf5SChih-Ping Chen call void @llvm.dbg.declare(metadata float* %"use_external_module_$X", metadata !13, metadata !DIExpression()), !dbg !17 195f75dcf5SChih-Ping Chen %func_result = call i32 @for_set_reentrancy(i32* @0), !dbg !18 205f75dcf5SChih-Ping Chen %external_module_mp_dummy__fetch = load float, float* @external_module_mp_dummy_, align 1, !dbg !19 215f75dcf5SChih-Ping Chen %add = fadd reassoc ninf nsz arcp contract afn float 2.000000e+00, %external_module_mp_dummy__fetch, !dbg !20 225f75dcf5SChih-Ping Chen store float %add, float* %"use_external_module_$X", align 1, !dbg !19 235f75dcf5SChih-Ping Chen ret void, !dbg !21 245f75dcf5SChih-Ping Chen} 255f75dcf5SChih-Ping Chen 265f75dcf5SChih-Ping Chen; Function Attrs: nofree nosync nounwind readnone speculatable willreturn 275f75dcf5SChih-Ping Chendeclare void @llvm.dbg.declare(metadata, metadata, metadata) #1 285f75dcf5SChih-Ping Chen 295f75dcf5SChih-Ping Chendeclare i32 @for_set_reentrancy(i32*) 305f75dcf5SChih-Ping Chen 315f75dcf5SChih-Ping Chenattributes #0 = { noinline nounwind uwtable "intel-lang"="fortran" "min-legal-vector-width"="0" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" } 325f75dcf5SChih-Ping Chenattributes #1 = { nofree nosync nounwind readnone speculatable willreturn } 335f75dcf5SChih-Ping Chen 345f75dcf5SChih-Ping Chen!llvm.module.flags = !{!15, !16} 355f75dcf5SChih-Ping Chen!llvm.dbg.cu = !{!6} 365f75dcf5SChih-Ping Chen!omp_offload.info = !{} 375f75dcf5SChih-Ping Chen 385f75dcf5SChih-Ping Chen!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) 395f75dcf5SChih-Ping Chen!1 = distinct !DIGlobalVariable(name: "dummy", linkageName: "external_module_mp_dummy_", scope: !2, file: !3, line: 1, type: !14, isLocal: false, isDefinition: true) 405f75dcf5SChih-Ping Chen!2 = distinct !DISubprogram(name: "use_external_module", linkageName: "MAIN__", scope: !3, file: !3, line: 1, type: !4, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !12) 415f75dcf5SChih-Ping Chen!3 = !DIFile(filename: "em.f90", directory: "tests") 425f75dcf5SChih-Ping Chen!4 = !DISubroutineType(types: !5) 435f75dcf5SChih-Ping Chen!5 = !{null} 445f75dcf5SChih-Ping Chen!6 = distinct !DICompileUnit(language: DW_LANG_Fortran95, file: !3, producer: "Intel(R) Fortran 21.0-2165", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !7, globals: !8, imports: !9, splitDebugInlining: false, nameTableKind: None) 455f75dcf5SChih-Ping Chen!7 = !{} 465f75dcf5SChih-Ping Chen!8 = !{!0} 475f75dcf5SChih-Ping Chen!9 = !{!10} 485f75dcf5SChih-Ping Chen!10 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !2, entity: !11, file: !3, line: 2) 495f75dcf5SChih-Ping Chen!11 = !DIModule(scope: !2, name: "external_module", isDecl: true) 505f75dcf5SChih-Ping Chen!12 = !{!13} 515f75dcf5SChih-Ping Chen!13 = !DILocalVariable(name: "x", scope: !2, file: !3, line: 5, type: !14) 525f75dcf5SChih-Ping Chen!14 = !DIBasicType(name: "REAL*4", size: 32, encoding: DW_ATE_float) 535f75dcf5SChih-Ping Chen!15 = !{i32 2, !"Debug Info Version", i32 3} 545f75dcf5SChih-Ping Chen!16 = !{i32 2, !"Dwarf Version", i32 4} 555f75dcf5SChih-Ping Chen!17 = !DILocation(line: 5, column: 12, scope: !2) 565f75dcf5SChih-Ping Chen!18 = !DILocation(line: 1, column: 9, scope: !2) 575f75dcf5SChih-Ping Chen!19 = !DILocation(line: 6, column: 4, scope: !2) 585f75dcf5SChih-Ping Chen!20 = !DILocation(line: 6, column: 12, scope: !2) 595f75dcf5SChih-Ping Chen!21 = !DILocation(line: 8, column: 1, scope: !2) 60