[win/asan] GetInstructionSize: Make `83 EC XX` a generic entry. (#119537)
[llvm-project.git] / flang / test / Lower / logical-as-fortran.f90
blob3b553365735f8ade7924456a6059ccca5084569a
1 ! Test that logicals are lowered to Fortran logical types where it matters
2 ! RUN: bbc %s -emit-fir -o - | FileCheck %s
4 ! Logicals should be lowered to Fortran logical types in memory/function
5 ! interfaces.
8 ! CHECK-LABEL: _QPtest_value_arguments
9 subroutine test_value_arguments()
10 interface
11 subroutine foo2(l)
12 logical(2) :: l
13 end subroutine
14 subroutine foo4(l)
15 logical(4) :: l
16 end subroutine
17 end interface
19 ! CHECK: %[[true2:.*]] = fir.convert %true{{.*}} : (i1) -> !fir.logical<2>
20 ! CHECK: fir.store %[[true2]] to %[[mem2:.*]] : !fir.ref<!fir.logical<2>>
21 ! CHECK: fir.call @_QPfoo2(%[[mem2]]) {{.*}}: (!fir.ref<!fir.logical<2>>) -> ()
22 call foo2(.true._2)
24 ! CHECK: %[[true4:.*]] = fir.convert %true{{.*}} : (i1) -> !fir.logical<4>
25 ! CHECK: fir.store %[[true4]] to %[[mem4:.*]] : !fir.ref<!fir.logical<4>>
26 ! CHECK: fir.call @_QPfoo4(%[[mem4]]) {{.*}}: (!fir.ref<!fir.logical<4>>) -> ()
27 call foo4(.true.)
29 end subroutine