| 1 |
! RUN: %flang_fc1 -emit-llvm -debug-info-kind=standalone %s -o - | FileCheck %s |
| 2 |
|
| 3 |
program mn |
| 4 |
|
| 5 |
integer d1(3) |
| 6 |
integer d2(2, 5) |
| 7 |
real d3(6, 8, 7) |
| 8 |
|
| 9 |
i8 = fn1(d1, d2, d3) |
| 10 |
contains |
| 11 |
function fn1(a1, b1, c1) result (res) |
| 12 |
integer a1(3) |
| 13 |
integer b1(2, 5) |
| 14 |
real c1(6, 8, 7) |
| 15 |
integer res |
| 16 |
res = a1(1) + b1(1,2) + c1(3, 3, 4) |
| 17 |
end function |
| 18 |
|
| 19 |
end program |
| 20 |
|
| 21 |
! CHECK-DAG: ![[INT:.*]] = !DIBasicType(name: "integer", size: 32, encoding: DW_ATE_signed) |
| 22 |
! CHECK-DAG: ![[REAL:.*]] = !DIBasicType(name: "real", size: 32, encoding: DW_ATE_float) |
| 23 |
! CHECK-DAG: ![[R1:.*]] = !DISubrange(count: 3, lowerBound: 1) |
| 24 |
! CHECK-DAG: ![[SUB1:.*]] = !{![[R1]]} |
| 25 |
! CHECK-DAG: ![[D1TY:.*]] = !DICompositeType(tag: DW_TAG_array_type, baseType: ![[INT]], elements: ![[SUB1]]) |
| 26 |
|
| 27 |
! CHECK-DAG: ![[R21:.*]] = !DISubrange(count: 2, lowerBound: 1) |
| 28 |
! CHECK-DAG: ![[R22:.*]] = !DISubrange(count: 5, lowerBound: 1) |
| 29 |
! CHECK-DAG: ![[SUB2:.*]] = !{![[R21]], ![[R22]]} |
| 30 |
! CHECK-DAG: ![[D2TY:.*]] = !DICompositeType(tag: DW_TAG_array_type, baseType: ![[INT]], elements: ![[SUB2]]) |
| 31 |
|
| 32 |
! CHECK-DAG: ![[R31:.*]] = !DISubrange(count: 6, lowerBound: 1) |
| 33 |
! CHECK-DAG: ![[R32:.*]] = !DISubrange(count: 8, lowerBound: 1) |
| 34 |
! CHECK-DAG: ![[R33:.*]] = !DISubrange(count: 7, lowerBound: 1) |
| 35 |
! CHECK-DAG: ![[SUB3:.*]] = !{![[R31]], ![[R32]], ![[R33]]} |
| 36 |
! CHECK-DAG: ![[D3TY:.*]] = !DICompositeType(tag: DW_TAG_array_type, baseType: ![[REAL]], elements: ![[SUB3]]) |
| 37 |
|
| 38 |
! CHECK-DAG: !DILocalVariable(name: "a1", arg: 1{{.*}}type: ![[D1TY]]) |
| 39 |
! CHECK-DAG: !DILocalVariable(name: "b1", arg: 2{{.*}}type: ![[D2TY]]) |
| 40 |
! CHECK-DAG: !DILocalVariable(name: "c1", arg: 3{{.*}}type: ![[D3TY]]) |