URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [nested_modules_1.f90] - Rev 302
Compare with Previous | Blame | View Log
! { dg-do run }!! This tests that common blocks function with multiply nested modules.! Contributed by Paul Thomas <pault@gcc.gnu.org>!module mod0complex(kind=8) FOO, KANGAcommon /bar/ FOO, KANGAcontainssubroutine eyeore ()FOO = FOO + (1.0d0, 0.0d0)KANGA = KANGA - (1.0d0, 0.0d0)end subroutine eyeoreend module mod0module mod1use mod0complex ROBINcommon/owl/ROBINend module mod1module mod2use mod0use mod1real(kind=8) re1, im1, re2, im2, re, imcommon /bar/ re1, im1, re2, im2equivalence (re1, re), (im1, im)containssubroutine tigger (w)complex(kind=8) wif (FOO.ne.(1.0d0, 1.0d0)) call abort ()if (KANGA.ne.(-1.0d0, -1.0d0)) call abort ()if (ROBIN.ne.(99.0d0, 99.0d0)) CALL abort ()if (w.ne.cmplx(re,im)) call abort ()end subroutine tiggerend module mod2use mod2use mod0, only: w=>foow = (0.0d0, 1.0d0) ! Was foo but this is forbidden (11.3.2)KANGA = (0.0d0, -1.0d0)ROBIN = (99.0d0, 99.0d0)call eyeore ()call tigger (w)end! { dg-final { cleanup-modules "mod0 mod1 mod2" } }
