1! { dg-do run }
2! { dg-options "-fdump-tree-original" }
3!
4! PR fortran/55134
5!
6! Contributed by Valery Weber
7!
8program bug
9  implicit none
10  integer,dimension(1)::i
11  i(:)=1
12  associate(a =>i)
13    call foo(a)
14  end associate
15! write(*,*) i
16  if (i(1) /= 2) call abort
17contains
18  subroutine foo(v)
19    integer, dimension(*) :: v
20    v(1)=2
21  end subroutine foo
22end program bug
23
24! { dg-final { scan-tree-dump-times "foo ..integer.kind=4..0:. . restrict. a.data.;" 1 "original" } }
25! { dg-final { cleanup-tree-dump "original" } }
26