2 ! { dg-options "-fbackslash" }
6 integer, parameter :: one
= 1, four
= 4
12 character(kind
=one
,len
=*), parameter :: inner1
= "abcdefg \xEF kl"
13 character(kind
=four
,len
=*), parameter :: &
14 inner4
= 4_
"\u9317x \U001298cef dea\u10De"
20 character(kind
=one
,len
=len(inner1
)), dimension(2,2), parameter :: middle1
&
21 = reshape ([ character(kind
=one
,len
=len(inner1
)) :: inner1
, ""], &
23 [ character(kind
=one
,len
=len(inner1
)) :: "foo", "ba " ])
24 character(kind
=four
,len
=len(inner4
)), dimension(2,2), parameter :: middle4
&
25 = reshape ([ character(kind
=four
,len
=len(inner4
)) :: inner4
, 4_
""], &
27 [ character(kind
=four
,len
=len(inner4
)) :: 4_
"foo", 4_
"ba " ])
33 character(kind
=one
,len
=*), parameter :: my1(2) = middle1(1,:)
34 character(kind
=four
,len
=*), parameter :: my4(2) = middle4(1,:)
38 use outer
, outer1
=> my1
, outer4
=> my4
41 if (len (inner1
) /= len(inner4
)) call abort
42 if (len (inner1
) /= len_trim(inner1
)) call abort
43 if (len (inner4
) /= len_trim(inner4
)) call abort
45 if (len(middle1
) /= len(inner1
)) call abort
46 if (len(outer1
) /= len(inner1
)) call abort
47 if (len(middle4
) /= len(inner4
)) call abort
48 if (len(outer4
) /= len(inner4
)) call abort
50 if (any (len_trim (middle1
) /= reshape([len(middle1
), 0, 3, 2], [2,2]))) &
52 if (any (len_trim (middle4
) /= reshape([len(middle4
), 0, 3, 2], [2,2]))) &
54 if (any (len_trim (outer1
) /= [len(outer1
), 3])) call abort
55 if (any (len_trim (outer4
) /= [len(outer4
), 3])) call abort
57 end program test_modules