URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [widechar_IO_1.f90] - Rev 801
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }
! Wide chracter I/O test 1, formatted and mixed kind
! Test case developed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
program test1
integer, parameter :: k4 = 4
character(len=10,kind=4) :: wide
character(len=10,kind=1) :: thin
character(kind=1,len=25) :: buffer
wide=k4_"Goodbye!"
thin="Hello!"
write(buffer, '(a)') wide
if (buffer /= "Goodbye!") call abort
open(10, form="formatted", access="stream", status="scratch")
write(10, '(a)') thin
rewind(10)
read(10, '(a)') wide
if (wide /= k4_"Hello!") call abort
write(buffer,*) thin, ">",wide,"<"
if (buffer /= " Hello! >Hello! <") call abort
end program test1
Go to most recent revision | Compare with Previous | Blame | View Log