1! { dg-do run } 2! { dg-options "-fbounds-check" } 3! { dg-shouldfail "Character length mismatch" } 4 5! PR fortran/37746 6! Test bounds-checking for string length of dummy arguments. 7 8SUBROUTINE test (str) 9 IMPLICIT NONE 10 CHARACTER(len=5) :: str 11END SUBROUTINE test 12 13PROGRAM main 14 IMPLICIT NONE 15 CALL test ('abc') ! { dg-warning "Character length of actual argument shorter" } 16END PROGRAM main 17 18! { dg-output "shorter than the declared one for dummy argument 'str' \\(3/5\\)" } 19