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! 8module foo 9 integer :: i 10end module foo 11module 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" } 15end module bar 16program 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" } 20end program foobar 21