Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Lower / non-standard-extensions.f90
blob664f52ed8fdbe4369afdb7016f6521d043d16c24
1 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
3 ! Test lowering of non standard features.
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