aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/pointer_check_10.f90
blob: 642f0a08b219199dc2baf6eb17f04226fe4844c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { dg-do run }
! { dg-options "-fcheck=all -std=f2003 -fall-intrinsics" }
! { dg-shouldfail "Pointer actual argument 'ptr' is not associated" }
!
! 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)) call abort ()
  end subroutine foo
end