c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_check_9.f90
blobf9b49bf72f5630d498da6efed24ac650a4dbe53b
1 ! { dg-do run }
2 ! { dg-options "-fcheck=all -std=f2008 " }
4 ! PR fortran/49255
6 ! Valid F2008, invalid F95/F2003.
8 integer,pointer :: ptr => null()
9 call foo (ptr)
10 contains
11 subroutine foo (x)
12 integer, optional :: x
13 if (present (x)) STOP 1
14 end subroutine foo
15 end