flang/test/Lower/Intrinsics/present.f90
raw| 1 | ! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s |
| 2 | |
| 3 | ! CHECK-LABEL: present_test |
| 4 | ! CHECK-SAME: %[[arg0:[^:]+]]: !fir.box<!fir.array<?xi32>> |
| 5 | subroutine 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 |
| 10 | end subroutine |