| 1 |
! { dg-do run } |
| 2 |
! PR 77746 - this used to crash during execution. |
| 3 |
! Original test case by Vladimir Fuka. |
| 4 |
module first |
| 5 |
private |
| 6 |
public execute |
| 7 |
|
| 8 |
interface execute |
| 9 |
module procedure random_name |
| 10 |
end interface |
| 11 |
|
| 12 |
contains |
| 13 |
|
| 14 |
subroutine random_name() |
| 15 |
end subroutine |
| 16 |
end module |
| 17 |
|
| 18 |
module test |
| 19 |
use first |
| 20 |
|
| 21 |
implicit none |
| 22 |
|
| 23 |
contains |
| 24 |
|
| 25 |
subroutine p_execute(i) bind(C, name="random_name") |
| 26 |
integer :: i |
| 27 |
|
| 28 |
call execute() |
| 29 |
end subroutine |
| 30 |
|
| 31 |
end module |
| 32 |
|
| 33 |
use test |
| 34 |
call p_execute(1) |
| 35 |
end |