aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/associate_11.f90
blob: 182c80b18b10dad54f3a46c789350b28ca62043c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do run }
! { dg-options "-fdump-tree-original" }
!
! PR fortran/55134
!
! Contributed by Valery Weber
!
program bug
  implicit none
  integer,dimension(1)::i
  i(:)=1
  associate(a =>i)
    call foo(a)
  end associate
! write(*,*) i
  if (i(1) /= 2) call abort
contains
  subroutine foo(v)
    integer, dimension(*) :: v
    v(1)=2
  end subroutine foo
end program bug

! { dg-final { scan-tree-dump-times "foo ..integer.kind=4..0:. . restrict. a.data.;" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }