PR middle-end/77674
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_check_10.f90
blob642f0a08b219199dc2baf6eb17f04226fe4844c9
1 ! { dg-do run }
2 ! { dg-options "-fcheck=all -std=f2003 -fall-intrinsics" }
3 ! { dg-shouldfail "Pointer actual argument 'ptr' is not associated" }
5 ! PR fortran/49255
7 ! Valid F2008, invalid F95/F2003.
9 integer,pointer :: ptr => null()
10 call foo (ptr)
11 contains
12 subroutine foo (x)
13 integer, optional :: x
14 if (present (x)) call abort ()
15 end subroutine foo
16 end