PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / bounds_check_array_ctor_8.f90
blob0b2479567ff787cc11c2cc42ddcd4671eefd5933
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check" }
3 ! { dg-shouldfail "foo" }
5 ! PR 36112
6 ! Check correct bounds-checking behavior for character-array-constructors.
8 call test ("short")
9 contains
10 subroutine test(s)
11 character(len=*) :: s
12 character(len=128) :: arr(3)
13 arr = (/ s, "this is long", "this one too" /)
14 end subroutine test
15 end
16 ! { dg-output "Different CHARACTER lengths \\(5/12\\) in array constructor" }