| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-finit-local-zero" } |
| 3 |
! |
| 4 |
! Contributed by Gerhard Steinmetz <[email protected]> |
| 5 |
! |
| 6 |
! Original implicitly typed 'x' gave a bad symbol ICE |
| 7 |
subroutine s1(x) |
| 8 |
target :: x(..) |
| 9 |
select rank (y => x) |
| 10 |
rank (1) |
| 11 |
rank (2) |
| 12 |
end select |
| 13 |
end |
| 14 |
|
| 15 |
! Comment #2: Failed with above option |
| 16 |
subroutine s2(x, z) |
| 17 |
real, target :: x(..) |
| 18 |
real :: z(10) |
| 19 |
select rank (y => x) ! Error was:Assumed-rank variable y at (1) may only be |
| 20 |
! used as actual argument |
| 21 |
rank (1) |
| 22 |
rank (2) |
| 23 |
end select |
| 24 |
end |