[flang][openacc][NFC] Check only HLFIR lowering for atomic tests (#72922)
[llvm-project.git] / flang / test / Lower / shape-of-elemental-with-optional-arg.f90
blob311a7a70131c65803bfa659b2e668885bfe4c5aa
1 ! Test that the shape of the elemental call is properly
2 ! computed as being rank 1, even though the only dummy
3 ! argument is optional.
5 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
6 ! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
8 subroutine test
9 interface
10 elemental function callee(arg1)
11 integer, intent(in), optional :: arg1
12 integer :: fun
13 end function callee
14 end interface
15 integer :: arr(2)
16 print *, callee(arr)
17 end subroutine test
18 ! The PRINT statement must be lowered into a ranked print:
19 ! CHECK: fir.call @_FortranAioOutputDescriptor