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

Subversion Repositories openrisc

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

Go to most recent revision | Compare with Previous | Blame | View Log

!{ dg-do run }
! Tests namelist on logical variables
! provided by Paul Thomas - pault@gcc.gnu.org

program namelist_17
  logical, dimension(2)        ::   l
  namelist /mynml/ l
  l = (/.true., .false./)

  open (10, status = "scratch")
  write (10, '(A)') "&mynml l = F T /"
  rewind (10)
  
  read (10, mynml, iostat = ier)
  if (ier .ne. 0) call abort ()
  close (10)

  open (10, status = "scratch")
  write (10, mynml, iostat = ier)
  if (ier .ne. 0) call abort ()
  rewind (10)

  l = (/.true., .false./)
  read (10, mynml, iostat = ier)
  if (ier .ne. 0) call abort ()
  close (10)

  if (l(1) .or. (.not.l(2))) call abort ()

end program namelist_17 

Go to most recent revision | 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.