Debian Codegraph @

flang/test/Lower/shape-of-elemental-with-optional-arg.f90

raw
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.
4
5 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
6 ! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
7
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