[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Lower / Intrinsics / present.f90
blobfaa7aa14d15c77a9bed84f50268fbb08efa65d58
1 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
3 ! CHECK-LABEL: present_test
4 ! CHECK-SAME: %[[arg0:[^:]+]]: !fir.box<!fir.array<?xi32>>
5 subroutine present_test(a)
6 integer, optional :: a(:)
8 if (present(a)) print *,a
9 ! CHECK: %{{.*}} = fir.is_present %[[arg0]] : (!fir.box<!fir.array<?xi32>>) -> i1
10 end subroutine