1! Compiled with pr83149.f90
2! { dg-do run }
3! { dg-compile-aux-modules "pr83149.f90" }
4! { dg-additional-sources pr83149.f90 }
5!
6! Contributed by Neil Carlson  <neil.n.carlson@gmail.com>
7!
8subroutine sub(s)
9  use mod2
10  real :: s
11  s = sum(get())
12end
13
14  use mod1
15  real :: s
16  ncells = 2
17  call sub (s)
18  if (int (s) .ne. ncells) stop 1
19  ncells = 10
20  call sub (s)
21  if (int (s) .ne. ncells) stop 2
22end
23
24