2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / associate_11.f90
blob3ef31f48fa12df2b5565e31e5abb2512196ff3ad
1 ! { dg-do run }
2 ! { dg-options "-fdump-tree-original" }
4 ! PR fortran/55134
6 ! Contributed by Valery Weber
8 program 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
17 contains
18 subroutine foo(v)
19 integer, dimension(*) :: v
20 v(1)=2
21 end subroutine foo
22 end program bug
24 ! { dg-final { scan-tree-dump-times "foo ..integer.kind=4..0:. . restrict. a.data.;" 1 "original" } }