2 ! { dg-options "-fbackslash" }
4 character(kind
=1,len
=20) :: s1
5 character(kind
=4,len
=20) :: s4
9 call check(s1
, 4_
"this is me! ")
10 call check2(s1
, 4_
"this is me! ")
12 call check(s1
, 4_
"this is me! ")
13 call check2(s1
, 4_
"this is me! ")
18 call check2(s1
, 4_
" ")
21 call check2(s1
, 4_
" ")
25 call check(s1
, 4_
" \xFF ")
26 call check2(s1
, 4_
" \xFF ")
28 call check(s1
, 4_
" \xFF ")
29 call check2(s1
, 4_
" \xFF ")
33 call check(s1
, 4_
" \xFF ")
34 call check2(s1
, 4_
" \xFF ")
36 call check(s1
, 4_
" \xFF ")
37 call check2(s1
, 4_
" \xFF ")
40 subroutine check(s1
,s4
)
41 character(kind
=1,len
=20) :: s1
, t1
42 character(kind
=4,len
=20) :: s4
45 if (len(s1
) /= len(t1
)) STOP 2
46 if (len(s1
) /= len(s4
)) STOP 3
47 if (len_trim(s1
) /= len_trim(t1
)) STOP 4
48 if (len_trim(s1
) /= len_trim(s4
)) STOP 5
51 subroutine check2(s1
,s4
)
52 character(kind
=1,len
=*) :: s1
53 character(kind
=4,len
=*) :: s4
54 character(kind
=1,len
=len(s1
)) :: t1
55 character(kind
=4,len
=len(s4
)) :: t4
61 if (len(s1
) /= len(t1
)) STOP 8
62 if (len(s1
) /= len(s4
)) STOP 9
63 if (len(s1
) /= len(t4
)) STOP 10
64 if (len_trim(s1
) /= len_trim(t1
)) STOP 11
65 if (len_trim(s1
) /= len_trim(s4
)) STOP 12
66 if (len_trim(s1
) /= len_trim(t4
)) STOP 13