summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dependency_49.f90
blob: 9638f65c06938e4d0d08f18e1ab805379a8c7eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
! { dg-options "-fdump-tree-original" }
! PR fortran/71902 - make sure that component references are followed
! for dependency analysis.
program main
  type foo
     character(len=:), allocatable :: x
  end type foo
  type(foo) :: a
  a%x = 'asdf'
  a%x = a%x(2:3)
  print *,a%x
end program main
! The temporary var appears three times: declaration, copy-in and copy-out
! { dg-final { scan-tree-dump-times "__var_1" 3 "original" } }