2 ! { dg-options "-fbackslash" }
5 call test (x, y, z, iachar(x), iachar(y), ichar(x), ichar(y))
10 TEST("\x80", 4_"\x80", int(z'80'))
11 TEST("\xFF", 4_"\xFF", int(z'FF'))
14 call test_bis (y, z, iachar(y), ichar(y))
16 TEST2(4_"\u0100", int(z'0100'))
17 TEST2(4_"\ufe00", int(z'fe00'))
18 TEST2(4_"\u106a", int(z'106a'))
19 TEST2(4_"\uff00", int(z'ff00'))
20 TEST2(4_"\uffff", int(z'ffff'))
24 subroutine test (s1, s4, i, i1, i2, i3, i4)
25 character(kind=1,len=1) :: s1
26 character(kind=4,len=1) :: s4
27 integer :: i, i1, i2, i3, i4
29 if (i /= i1) call abort
30 if (i /= i2) call abort
31 if (i /= i3) call abort
32 if (i /= i4) call abort
34 if (iachar (s1) /= i) call abort
35 if (iachar (s4) /= i) call abort
37 if (ichar (s1) /= i) call abort
38 if (ichar (s4) /= i) call abort
40 if (achar(i, kind=1) /= s1) call abort
41 if (achar(i, kind=4) /= s4) call abort
43 if (char(i, kind=1) /= s1) call abort
44 if (char(i, kind=4) /= s4) call abort
46 if (iachar(achar(i, kind=1)) /= i) call abort
47 if (iachar(achar(i, kind=4)) /= i) call abort
49 if (ichar(char(i, kind=1)) /= i) call abort
50 if (ichar(char(i, kind=4)) /= i) call abort
54 subroutine test_bis (s4, i, i2, i4)
55 character(kind=4,len=1) :: s4
58 if (i /= i2) call abort
59 if (i /= i4) call abort
61 if (iachar (s4) /= i) call abort
62 if (ichar (s4) /= i) call abort
63 if (achar(i, kind=4) /= s4) call abort
64 if (char(i, kind=4) /= s4) call abort
65 if (iachar(achar(i, kind=4)) /= i) call abort
66 if (ichar(char(i, kind=4)) /= i) call abort
68 end subroutine test_bis