* tree-ssa-loop-manip.c (split_loop_exit_edge): Return the new block.
[official-gcc.git] / gcc / testsuite / gfortran.dg / nested_modules_2.f90
blob3d0985a7eac52e61b6d911ddcacdb14c365ed367
1 ! { dg do-run }
2 ! This tests the patch for PR16861.
4 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
6 module foo
7 INTEGER :: i
8 end module foo
10 module bar
11 contains
12 subroutine sub1 (j)
13 use foo
14 integer, dimension(i) :: j
15 j = 42
16 end subroutine sub1
17 subroutine sub2 (k)
18 use foo
19 integer, dimension(i) :: k
20 k = 84
21 end subroutine sub2
22 end module bar
24 module foobar
25 use foo !This used to cause an ICE
26 use bar
27 end module foobar
29 program testfoobar
30 use foobar
31 integer, dimension(3) :: l = 0
32 i = 2
33 call sub1 (l)
34 i = 1
35 call sub2 (l)
36 if (all (l.ne.(/84,42,0/))) call abort ()
37 end program testfoobar
39 ! { dg-final { cleanup-modules "foo bar foobar" } }