gcc/testsuite/gfortran.dg/coarray/add_sources/submodule_1_sub.f90
raw| 1 | ! This test belongs to submodule_1.f90 |
| 2 | ! It is references as additional source in that test. |
| 3 | ! The two code fragments need to be in separate files to show |
| 4 | ! the error of pr80235. |
| 5 | |
| 6 | submodule (pr80235) pr80235_sub |
| 7 | |
| 8 | contains |
| 9 | module subroutine test() |
| 10 | implicit none |
| 11 | if (var%v /= 42) stop 1 |
| 12 | end subroutine |
| 13 | end submodule pr80235_sub |
| 14 | |
| 15 | program pr80235_prg |
| 16 | use pr80235 |
| 17 | |
| 18 | implicit none |
| 19 | |
| 20 | var%v = 42 |
| 21 | call test() |
| 22 | end program |