summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr46985.f90
blob: 141641d29e9996e7c38c78a6a4a498e1cac05d39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! PR tree-optimization/46985
! { dg-do compile }
! { dg-options "-O -ftree-pre -ftree-vrp -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-fre" }

  type :: t
    integer :: i
  end type t
  type(t), target :: tar(2) = (/t(2), t(4)/)
  integer, pointer :: ptr(:)
  ptr => tar%i
  call foo (ptr)
contains
  subroutine foo (arg)
    integer :: arg(:)
    arg = arg - 1
  end subroutine
end