OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [nested_modules_2.f90] - Blame information for rev 868

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg do-run }
2
! This tests the patch for PR16861.
3
!
4
! Contributed by Paul Thomas 
5
!
6
module foo
7
INTEGER :: i
8
end module foo
9
 
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
23
 
24
module foobar
25
  use foo                      !This used to cause an ICE
26
  use bar
27
end module foobar
28
 
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
38
 
39
! { dg-final { cleanup-modules "foo bar foobar" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.