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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [pr17285.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! pr 17285
3
! Test that namelist can read its own output.
4
! At the same time, check arrays and different terminations
5
! Based on example provided by paulthomas2@wanadoo.fr
6
 
7
program pr17285
8
  implicit none
9
  integer, dimension(10) :: number = 42
10
  integer                :: ctr, ierr
11
  namelist /mynml/ number
12
  open (10, status = "scratch")
13
  write (10,'(A)') &
14
    "&mynml number(:)=42,42,42,42,42,42,42,42,42,42,/ "
15
  write (10,mynml)
16
  write (10,'(A)') "&mynml number(1:10)=10*42 &end"
17
  rewind (10)
18
  do ctr = 1,3
19
    number = 0
20
    read (10, nml = mynml, iostat = ierr)
21
    if ((ierr /= 0) .or. (any (number /= 42))) &
22
      call abort ()
23
  end do
24
  close(10)
25
end program pr17285

powered by: WebSVN 2.1.0

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