PR c++/27177
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_intent_2.f90
blob692570339a36cac20e292bf799ad4a6d0b25aa2e
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
3 ! { dg-shouldfail "Fortran 2003 feature with -std=f95" }
5 ! Pointer intent test
6 ! PR fortran/29624
8 ! Fortran 2003 features in Fortran 95
9 program test
10 implicit none
11 integer, pointer :: p
12 allocate(p)
13 p = 33
14 call a(p) ! { dg-error "Type mismatch in argument" }
15 contains
16 subroutine a(p)! { dg-error "has no IMPLICIT type" }
17 integer, pointer,intent(in) :: p ! { dg-error "POINTER attribute with INTENT attribute" }
18 end subroutine
19 end program