[flang][cuda] Do not apply implicit data attribute on dummy arg with VALUE (#119927)
[llvm-project.git] / flang / test / Transforms / debug-line-table-inc-file.fir
blob216cd5e016f2f8b0f33d2befa8a25cff2d71c8f8
2 // RUN: fir-opt --add-debug-info="debug-level=LineTablesOnly" --mlir-print-debuginfo %s | FileCheck %s
3 // REQUIRES: system-linux
5 // Test for included functions that have a different debug location than the current file
6 module attributes {dlti.dl_spec = #dlti.dl_spec<>} {
7   func.func @_QPsinc() {
8     return loc(#loc2)
9   } loc(#loc1)
10   func.func @_QQmain() {
11     fir.call @_QPsinc() fastmath<contract> : () -> () loc(#loc4)
12     return loc(#loc5)
13   } loc(#loc3)
14 } loc(#loc)
15 #loc = loc("/home/user01/llvm-project/build_release/simple.f90":0:0)
16 #loc1 = loc("/home/user01/llvm-project/build_release/inc.f90":1:1)
17 #loc2 = loc("/home/user01/llvm-project/build_release/inc.f90":2:1)
18 #loc3 = loc("/home/user01/llvm-project/build_release/simple.f90":3:1)
19 #loc4 = loc("/home/user01/llvm-project/build_release/simple.f90":4:3)
20 #loc5 = loc("/home/user01/llvm-project/build_release/simple.f90":5:1)
22 // CHECK: module
23 // CHECK:   func.func @_QPsinc() {
24 // CHECK:   } loc(#[[FUSED_LOC_INC_FILE:.*]])
25 // CHECK:   func.func @_QQmain() {
26 // CHECK:   } loc(#[[FUSED_LOC_FILE:.*]])
27 // CHECK: } loc(#[[MODULE_LOC:.*]])
28 // CHECK: #[[DI_FILE:.*]] = #llvm.di_file<"simple.f90" in "[[DIR:.*]]">
29 // CHECK: #[[DI_INC_FILE:.*]] = #llvm.di_file<"inc.f90" in "[[DIR]]">
30 // CHECK: #[[MODULE_LOC]] = loc("{{.*}}simple.f90":0:0)
31 // CHECK: #[[LOC_INC_FILE:.*]] = loc("{{.*}}inc.f90":1:1)
32 // CHECK: #[[LOC_FILE:.*]] = loc("{{.*}}simple.f90":3:1)
33 // CHECK: #[[DI_CU:.*]] = #llvm.di_compile_unit<id = distinct[{{.*}}]<>, sourceLanguage = DW_LANG_Fortran95, file = #[[DI_FILE]], producer = "{{.*}}flang{{.*}}", isOptimized = false, emissionKind = LineTablesOnly>
34 // CHECK: #[[DI_SP_INC:.*]] = #llvm.di_subprogram<{{.*}}id = distinct[{{.*}}]<>, compileUnit = #[[DI_CU]], scope = #[[DI_FILE]], name = "sinc", linkageName = "_QPsinc", file = #[[DI_INC_FILE]], {{.*}}>
35 // CHECK: #[[DI_SP:.*]] = #llvm.di_subprogram<{{.*}}id = distinct[{{.*}}]<>, compileUnit = #[[DI_CU]], scope = #[[DI_FILE]], name = "_QQmain", linkageName = "_QQmain", file = #[[DI_FILE]], {{.*}}>
36 // CHECK: #[[FUSED_LOC_INC_FILE]] = loc(fused<#[[DI_SP_INC]]>[#[[LOC_INC_FILE]]])
37 // CHECK: #[[FUSED_LOC_FILE]] = loc(fused<#[[DI_SP]]>[#[[LOC_FILE]]])