| 1 |
! { dg-do run } |
| 2 |
! PR fortran/90539 - this used to cause an ICE. |
| 3 |
|
| 4 |
module t2 |
| 5 |
implicit none |
| 6 |
contains |
| 7 |
subroutine foo(a) |
| 8 |
real, dimension(*) :: a |
| 9 |
if (a(1) /= 1.0 .or. a(2) /= 2.0) stop 1 |
| 10 |
end subroutine foo |
| 11 |
end module t2 |
| 12 |
|
| 13 |
module t1 |
| 14 |
use t2 |
| 15 |
implicit none |
| 16 |
contains |
| 17 |
subroutine bar(a) |
| 18 |
real, dimension(:) :: a |
| 19 |
if (a(1) /= 1.0 .or. a(2) /= 2.0) stop 1 |
| 20 |
call foo(a) |
| 21 |
end subroutine bar |
| 22 |
end module t1 |
| 23 |
|
| 24 |
program main |
| 25 |
use t1 |
| 26 |
call bar([1.0, 2.0]) |
| 27 |
end program main |