Files
clang-p2996/flang/test/Integration/debug-complex-2.f90
Abid Qadeer 49dfbd13ad flang][debug] Run AddDebugInfo before TargetRewrite. (#114418)
This help us generate debug info that better represents the actual
Fortran source code. It was briefly discussed
[here](https://github.com/llvm/llvm-project/pull/113917#pullrequestreview-2401339038).
    
Fixes #108711.
2024-11-05 11:42:18 +00:00

13 lines
533 B
Fortran

! RUN: %flang_fc1 -emit-llvm -debug-info-kind=standalone %s -o - | FileCheck %s
! Test that complex return type is correctly represented in debug.
complex function fn(a)
complex, intent(in) :: a
fn = a
end function
! CHECK-DAG: ![[CMPLX:.*]] = !DIBasicType(name: "complex", size: 64, encoding: DW_ATE_complex_float)
! CHECK-DAG: ![[SR_TY:.*]] = !DISubroutineType(cc: DW_CC_normal, types: ![[TYPES:.*]])
! CHECK-DAG: ![[TYPES]] = !{![[CMPLX]], ![[CMPLX]]}
! CHECK-DAG: !DISubprogram(name: "fn"{{.*}}type: ![[SR_TY]]{{.*}})