view gcc/testsuite/gfortran.dg/pr46985.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

! 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