| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR 54147: [F03] Interface checks for PPCs & deferred TBPs |
| 4 |
! |
| 5 |
! Contributed by Janus Weil <[email protected]> |
| 6 |
|
| 7 |
interface gen |
| 8 |
procedure gen |
| 9 |
end interface |
| 10 |
|
| 11 |
type t1 |
| 12 |
procedure(gen),pointer,nopass :: p1 |
| 13 |
procedure(gen2),pointer,nopass :: p2 ! { dg-error "may not be generic" } |
| 14 |
end type |
| 15 |
|
| 16 |
type t2 |
| 17 |
procedure(sf),pointer,nopass :: p3 ! { dg-error "may not be a statement function" } |
| 18 |
end type |
| 19 |
|
| 20 |
type t3 |
| 21 |
procedure(char),pointer,nopass :: p4 ! { dg-error "Intrinsic procedure" } |
| 22 |
end type |
| 23 |
|
| 24 |
interface gen2 |
| 25 |
procedure gen |
| 26 |
end interface |
| 27 |
|
| 28 |
sf(x) = x**2 ! { dg-warning "Obsolescent feature" } |
| 29 |
|
| 30 |
contains |
| 31 |
|
| 32 |
subroutine gen |
| 33 |
end subroutine |
| 34 |
|
| 35 |
end |