gcc/testsuite/gfortran.dg/submodule_12.f08
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! Test the fix for PR68237 in which 'foo' caused a seg fault rather than an error. |
| 4 | ! |
| 5 | ! Contributed by Martin Reinecke <[email protected]> |
| 6 | ! |
| 7 | module m1 |
| 8 | interface |
| 9 | module subroutine bar |
| 10 | end subroutine |
| 11 | end interface |
| 12 | end module m1 |
| 13 | |
| 14 | submodule (m1) m2 |
| 15 | contains |
| 16 | module procedure foo ! { dg-error "must be in a generic module interface" } |
| 17 | end procedure ! { dg-error "Expecting END SUBMODULE statement" } |
| 18 | end submodule |