Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/submodule_22.f08 @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 (2018-10-25) |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line source
! { dg-do compile } ! ! Test the fix for PR78474. ! ! Contributed by Nicholas Brearly <nick.brealey@cobham.com> ! module mtop implicit none real :: r interface module subroutine sub1() end subroutine end interface interface module subroutine sub2() end subroutine end interface interface module subroutine sub3() end subroutine end interface end module mtop submodule (mtop) submod implicit none real :: s contains module subroutine sub1 r = 0.0 end subroutine sub1 end submodule (mtop:submod) subsubmod contains module subroutine sub2 r = 1.0 s = 1.0 end subroutine sub2 end submodule (mtop:submod:subsubmod) subsubsubmod ! { dg-error "Syntax error in SUBMODULE statement" } contains module subroutine sub3 r = 2.0 s = 2.0 end subroutine sub3 end