diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pointer_intent_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/pointer_intent_2.f90 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pointer_intent_2.f90 b/gcc/testsuite/gfortran.dg/pointer_intent_2.f90 new file mode 100644 index 000000000..692570339 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pointer_intent_2.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! { dg-options "-std=f95" } +! { dg-shouldfail "Fortran 2003 feature with -std=f95" } +! +! Pointer intent test +! PR fortran/29624 +! +! Fortran 2003 features in Fortran 95 +program test + implicit none + integer, pointer :: p + allocate(p) + p = 33 + call a(p) ! { dg-error "Type mismatch in argument" } +contains + subroutine a(p)! { dg-error "has no IMPLICIT type" } + integer, pointer,intent(in) :: p ! { dg-error "POINTER attribute with INTENT attribute" } + end subroutine +end program |