1! With bind(C), the C (CFI) array descriptor is converted to
2! a Fortran array descriptor - thus, internally a PARM_DECL is
3! converted to a VAR_DECL - check that the optional check still works
4
5module m
6contains
7subroutine foo(x, y)  bind(C)
8  integer, optional :: x,y(:)
9  !$omp target map(tofrom:x)
10     if (present (x)) x = 5
11     if (present (y)) y(1) = 5
12  !$omp end target
13end
14end
15
16use m
17call foo()
18end
19