2 ! This tests the fix for PR28735 in which an ICE would be triggered in resolve_ref
3 ! because the references to 'a' and 'b' in the dummy arguments of mysub have
4 ! no symtrees in module bar, being private there.
6 ! Contributed by Andrew Sampson <adsspamtrap01@yahoo.com>
8 !-- foo.F -----------------------------------------------
12 integer, allocatable :: a(:), b(:)
15 !-- bar.F ---------------------------------------------
19 private ! This triggered the ICE
20 public :: mysub ! since a and b are not public
24 subroutine mysub(n, parray1)
25 integer, intent(in) :: n
26 real, dimension(a(n):b(n)) :: parray1
27 if ((n == 1) .and. size(parray1, 1) /= 10) call abort ()
28 if ((n == 2) .and. size(parray1, 1) /= 42) call abort ()
32 !-- sub.F -------------------------------------------------------
47 !-- MAIN ------------------------------------------------------
52 ! { dg-final { cleanup-modules "foo bar" } }