| 1 |
! { dg-do compile } |
| 2 |
! Tests the fix for PR29464, in which the second USE of the generic |
| 3 |
! interface caused an error. |
| 4 |
! |
| 5 |
! Contributed by Vivek Rao <[email protected]> |
| 6 |
! |
| 7 |
module foo_mod |
| 8 |
implicit none |
| 9 |
interface twice |
| 10 |
module procedure twice_real |
| 11 |
end interface twice |
| 12 |
contains |
| 13 |
real function twice_real(x) |
| 14 |
real :: x |
| 15 |
twice_real = 2*x |
| 16 |
end function twice_real |
| 17 |
end module foo_mod |
| 18 |
|
| 19 |
subroutine foobar () |
| 20 |
use foo_mod, only: twice, twice |
| 21 |
print *, twice (99.0) |
| 22 |
end subroutine foobar |
| 23 |
|
| 24 |
program xfoo |
| 25 |
use foo_mod, only: two => twice, dbl => twice |
| 26 |
implicit none |
| 27 |
call foobar () |
| 28 |
print *, two (2.3) |
| 29 |
print *, dbl (2.3) |
| 30 |
end program xfoo |