2 ! { dg-options -fbackslash }
3 ! Wide chracter I/O test 4, formatted ISO-8859-1 characters in string
4 ! Test case developed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
5 ! Compile with -fbackslash
6 integer, parameter :: k4
= 4
7 character(kind
=1,len
=15) :: buffer
8 character(kind
=1, len
=1) :: c1
, c2
9 character(kind
=4,len
=20) :: str
= k4_
'X\xF8öABC' ! ISO-8859-1 encoded string
11 write(buffer
,'(3a)')':',trim(str
),':'
12 if (buffer
.ne
.':X\xF8öABC: ') call abort
14 read(buffer
,'(3a)') c1
,str(1:6),c2
15 if (c1
.ne
.':') call abort
16 if (str
.ne
.k4_
'X\xF8öAB') call abort
17 if (c2
.ne
.'C') call abort