gcc/testsuite/gfortran.dg/pr83149_1.f90
raw| 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 <[email protected]> |
| 7 | ! |
| 8 | subroutine sub(s) |
| 9 | use mod2 |
| 10 | real :: s |
| 11 | s = sum(get()) |
| 12 | end |
| 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 |
| 22 | end |
| 23 |