1! RUN: bbc -emit-fir %s -o - | FileCheck %s
2
3! CHECK-LABEL: present_test
4! CHECK-SAME: %[[arg0:[^:]+]]: !fir.box<!fir.array<?xi32>>
5subroutine present_test(a)
6  integer, optional :: a(:)
7
8  if (present(a)) print *,a
9  ! CHECK: %{{.*}} = fir.is_present %[[arg0]] : (!fir.box<!fir.array<?xi32>>) -> i1
10end subroutine
11