| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR 40453: [F95] Enhanced (recursive) argument checking |
| 4 |
! |
| 5 |
! Contributed by Tobias Burnus <[email protected]> |
| 6 |
|
| 7 |
program RecursiveInterface |
| 8 |
|
| 9 |
call c(b2) ! { dg-error "Interface mismatch in dummy procedure" } |
| 10 |
|
| 11 |
contains |
| 12 |
|
| 13 |
subroutine a1(x) |
| 14 |
real :: x |
| 15 |
end subroutine |
| 16 |
|
| 17 |
subroutine a2(i) |
| 18 |
integer :: i |
| 19 |
end subroutine |
| 20 |
|
| 21 |
!!!!!!!!!!!!!!! |
| 22 |
|
| 23 |
subroutine b1 (f1) |
| 24 |
procedure(a1) :: f1 |
| 25 |
end subroutine |
| 26 |
|
| 27 |
subroutine b2 (f2) |
| 28 |
procedure(a2) :: f2 |
| 29 |
end subroutine |
| 30 |
|
| 31 |
!!!!!!!!!!!!!!! |
| 32 |
|
| 33 |
subroutine c(g) |
| 34 |
procedure(b1) :: g |
| 35 |
end subroutine |
| 36 |
|
| 37 |
end |