| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fdec-static -fno-automatic -fdump-tree-original" } |
| 3 |
! |
| 4 |
! Neither of the local variable have the automatic attribute so they |
| 5 |
! not be allocated on the stack. |
| 6 |
|
| 7 |
subroutine foo |
| 8 |
integer :: a |
| 9 |
integer :: b |
| 10 |
equivalence (a, b) |
| 11 |
a = 5 |
| 12 |
if (b.ne.5) stop 1 |
| 13 |
end subroutine |
| 14 |
|
| 15 |
! { dg-final { scan-tree-dump "static union" "original" } } |
| 16 |
! { dg-final { scan-tree-dump "static integer\\(kind=4\\) a" "original" } } |
| 17 |
! { dg-final { scan-tree-dump "static integer\\(kind=4\\) b" "original" } } |
| 18 |
|