1! { dg-do run } 2! { dg-options "-fbounds-check" } 3! { dg-shouldfail "Substring out of bounds check" } 4! PR fortran/27588 5program bound_check 6 character*10 zz 7 i = 2 8 j = i+9 9 zz = ' ' 10 zz(i:j) = 'abcdef' 11 print * , zz 12 end 13! { dg-output "At line 10.*Substring out of bounds: upper bound \\(11\\) of 'zz' exceeds string length" } 14