view gcc/testsuite/gfortran.dg/dependency_45.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { 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') STOP 1
end program main