| 1 |
! { dg-do compile } |
| 2 |
! Tests the patch for PR28873, in which the call create () would cause an |
| 3 |
! error because resolve.c(resolve_generic_s) was failing to look in the |
| 4 |
! parent namespace for a matching specific subroutine. This, in fact, was |
| 5 |
! a regression due to the fix for PR28201. |
| 6 |
! |
| 7 |
! Contributed by Drew McCormack <[email protected]> |
| 8 |
! |
| 9 |
module A |
| 10 |
private |
| 11 |
interface create |
| 12 |
module procedure create1 |
| 13 |
end interface |
| 14 |
public :: create |
| 15 |
contains |
| 16 |
subroutine create1 |
| 17 |
print *, "module A" |
| 18 |
end subroutine |
| 19 |
end module |
| 20 |
|
| 21 |
module B |
| 22 |
private |
| 23 |
interface create |
| 24 |
module procedure create1 |
| 25 |
end interface |
| 26 |
public :: create |
| 27 |
contains |
| 28 |
subroutine create1(a) |
| 29 |
integer a |
| 30 |
print *, "module B" |
| 31 |
end subroutine |
| 32 |
end module |
| 33 |
|
| 34 |
module C |
| 35 |
use A |
| 36 |
private |
| 37 |
public useCreate |
| 38 |
contains |
| 39 |
subroutine useCreate |
| 40 |
use B |
| 41 |
call create() |
| 42 |
call create(1) |
| 43 |
end subroutine |
| 44 |
end module |
| 45 |
|
| 46 |
use c |
| 47 |
call useCreate |
| 48 |
end |