Debian Codegraph @

gcc/testsuite/gfortran.dg/submodule_21.f08

raw
1 ! { dg-do compile }
2 !
3 ! Test the fix for PR78331.
4 !
5 ! Reported on https://groups.google.com/forum/#!topic/comp.lang.fortran/NFCF9brKksg
6 !
7 MODULE MainModule
8 END MODULE MainModule
9
10 SUBMODULE (MainModule) MySub1
11 IMPLICIT NONE
12 INTEGER, PARAMETER :: a = 17
13 END SUBMODULE MySub1
14
15 PROGRAM MyProg
16 USE MainModule
17 WRITE(*,*) a
18 END PROGRAM MyProg
19 ! { dg-error "does not contain a MODULE PROCEDURE" "" { target "*-*-*" } 0 }
20 ! { dg-prune-output "compilation terminated" }