aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr83149_1.f90
blob: 3a8f5d55d9b776a28d7624a4b0d3374c671a3042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
! Compiled with pr83149.f90
! { dg-do run }
! { dg-options "-fno-whole-file" }
! { dg-compile-aux-modules "pr83149.f90" }
! { dg-additional-sources pr83149.f90 }
!
! Contributed by Neil Carlson  <neil.n.carlson@gmail.com>
!
subroutine sub(s)
  use mod2
  real :: s
  s = sum(get())
end

  use mod1
  real :: s
  ncells = 2
  call sub (s)
  if (int (s) .ne. ncells) stop 1
  ncells = 10
  call sub (s)
  if (int (s) .ne. ncells) stop 2
end