| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Tests the fix for PR36454, where the PUBLIC declaration for |
| 4 |
! aint and bint was rejected because the access was already set. |
| 5 |
! |
| 6 |
! Contributed by Thomas Orgis <[email protected]> |
| 7 |
|
| 8 |
module base |
| 9 |
integer :: baseint |
| 10 |
end module |
| 11 |
|
| 12 |
module a |
| 13 |
use base, ONLY: aint => baseint |
| 14 |
end module |
| 15 |
|
| 16 |
module b |
| 17 |
use base, ONLY: bint => baseint |
| 18 |
end module |
| 19 |
|
| 20 |
module c |
| 21 |
use a |
| 22 |
use b |
| 23 |
private |
| 24 |
public :: aint, bint |
| 25 |
end module |
| 26 |
|
| 27 |
program user |
| 28 |
use c, ONLY: aint, bint |
| 29 |
|
| 30 |
aint = 3 |
| 31 |
bint = 8 |
| 32 |
write(*,*) aint |
| 33 |
end program |