| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-std=f95" } |
| 3 |
! { dg-shouldfail "Fortran 2003 feature with -std=f95" } |
| 4 |
! |
| 5 |
! Pointer intent test |
| 6 |
! PR fortran/29624 |
| 7 |
! |
| 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 conflicts with INTENT attribute" } |
| 18 |
end subroutine |
| 19 |
end program |