Skip to content

Commit 017a895

Browse files
committed
Add test.
1 parent 0fba70e commit 017a895

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=standalone %s -o - | FileCheck %s
2+
3+
! Test that complex return type is correctly represented in debug.
4+
complex function fn(a)
5+
complex, intent(in) :: a
6+
fn = a
7+
end function
8+
9+
! CHECK-DAG: ![[CMPLX:.*]] = !DIBasicType(name: "complex", size: 64, encoding: DW_ATE_complex_float)
10+
! CHECK-DAG: ![[SR_TY:.*]] = !DISubroutineType(cc: DW_CC_normal, types: ![[TYPES:.*]])
11+
! CHECK-DAG: ![[TYPES]] = !{![[CMPLX]], ![[CMPLX]]}
12+
! CHECK-DAG: !DISubprogram(name: "fn"{{.*}}type: ![[SR_TY]]{{.*}})

0 commit comments

Comments
 (0)