aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pointer_check_9.f90
blob: f9b49bf72f5630d498da6efed24ac650a4dbe53b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do run }
! { dg-options "-fcheck=all -std=f2008 " }
!
! PR fortran/49255
!
! Valid F2008, invalid F95/F2003.
!
integer,pointer :: ptr => null()
call foo (ptr)
contains
  subroutine foo (x)
    integer, optional :: x
    if (present (x)) STOP 1
  end subroutine foo
end