1! { dg-do run } 2! { dg-options "-fbounds-check" } 3! { dg-shouldfail "Unequal character lengths" } 4 5! PR fortran/38137 6! Test that -fbounds-check detects unequal character lengths to MERGE 7! at runtime. 8 9! Contributed by Tobias Burnus <burnus@gcc.gnu.org> 10 11subroutine foo(a) 12implicit none 13character(len=*) :: a 14character(len=3) :: b 15logical :: ll = .true. 16print *, merge(a,b,ll) ! Unequal character lengths 17end subroutine foo 18 19call foo("ab") 20end 21