| 1 |
! RUN: bbc -emit-fir %s -o - | FileCheck %s |
| 2 |
|
| 3 |
! Test lowering of non standard features. |
| 4 |
|
| 5 |
! Test mismatch on result type between callee/caller |
| 6 |
! CHECK-LABEL: func @_QPexpect_i32 |
| 7 |
subroutine expect_i32() |
| 8 |
external :: returns_i32 |
| 9 |
real(4) :: returns_i32 |
| 10 |
! CHECK: %[[funcAddr:.*]] = fir.address_of(@_QPreturns_i32) : () -> i32 |
| 11 |
! CHECK: %[[funcCast:.*]] = fir.convert %[[funcAddr]] : (() -> i32) -> (() -> f32) |
| 12 |
! CHECK: fir.call %[[funcCast]]() {{.*}}: () -> f32 |
| 13 |
print *, returns_i32() |
| 14 |
end subroutine |
| 15 |
integer(4) function returns_i32() |
| 16 |
end function |