summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dependency_45.f90
blob: 8b43f7507b6f19cadf369ef151bc875fb0783501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
! { dg-do run }
! { dg-options "-Warray-temporaries" }
! PR 56867 - substrings were not checked for dependency.
program main
  character(len=4) :: a
  character(len=4) :: c(3)
  c(1) = 'abcd'
  c(2) = '1234'
  c(3) = 'wxyz'
  c(:)(1:2) = c(2)(2:3)   ! { dg-warning "array temporary" }
  if (c(3) .ne. '23yz') call abort
end program main