2015-07-03 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / dependency_45.f90
blob8b43f7507b6f19cadf369ef151bc875fb0783501
1 ! { dg-do run }
2 ! { dg-options "-Warray-temporaries" }
3 ! PR 56867 - substrings were not checked for dependency.
4 program main
5 character(len=4) :: a
6 character(len=4) :: c(3)
7 c(1) = 'abcd'
8 c(2) = '1234'
9 c(3) = 'wxyz'
10 c(:)(1:2) = c(2)(2:3) ! { dg-warning "array temporary" }
11 if (c(3) .ne. '23yz') call abort
12 end program main