OpenCores
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 694

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

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.