OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [widechar_IO_4.f90] - Rev 694

Compare with Previous | Blame | View Log

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

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.