OSDN Git Service

2010-04-06 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / bad_automatic_objects_1.f90
1 ! { dg-do compile }
2 ! Tests the fix for 25103, in which the presence of automatic objects
3 ! in the main program and the specification part of a module was not
4 ! detected.
5 !
6 ! Contributed by Joost VandeVondele  <jv244@cam.ac.uk>
7 !
8 module foo
9   integer    ::  i
10 end module foo
11 module bar
12   use foo
13   integer, dimension (i) :: j ! { dg-error "must have constant shape" }
14   character (len = i) :: c1   ! { dg-error "must have constant character length" }
15 end module bar
16 program foobar
17   use foo
18   integer, dimension (i) :: k ! { dg-error "must have constant shape" }
19   character (len = i) :: c2   ! { dg-error "must have constant character length" }
20 end program foobar
21
22 ! { dg-final { cleanup-modules "foo bar" } }