| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-w" } |
| 3 |
! PR fortran/104649 |
| 4 |
! Contributed by G.Steinmetz |
| 5 |
|
| 6 |
module m |
| 7 |
interface |
| 8 |
module subroutine s(x) |
| 9 |
real :: x |
| 10 |
end |
| 11 |
end interface |
| 12 |
end |
| 13 |
submodule(m) m2 |
| 14 |
contains |
| 15 |
module subroutine s(*) ! { dg-error "conflicts with alternate return" } |
| 16 |
end |
| 17 |
end |
| 18 |
|
| 19 |
module n |
| 20 |
interface |
| 21 |
module subroutine s(*) |
| 22 |
end |
| 23 |
end interface |
| 24 |
end |
| 25 |
submodule(n) n2 |
| 26 |
contains |
| 27 |
module subroutine s(x) ! { dg-error "formal argument is alternate return" } |
| 28 |
real :: x |
| 29 |
end |
| 30 |
end |
| 31 |
|
| 32 |
module p |
| 33 |
interface |
| 34 |
module subroutine s(x) |
| 35 |
real :: x |
| 36 |
end |
| 37 |
end interface |
| 38 |
end |
| 39 |
submodule(p) p2 |
| 40 |
contains |
| 41 |
module subroutine s(y) ! { dg-error "Mismatch in MODULE PROCEDURE formal argument names" } |
| 42 |
real :: y |
| 43 |
end |
| 44 |
end |