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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_22.f90] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
!{ dg-do run }
2
! Tests filling arrays from a namelist read when object list is not complete.
3
! This is the same as namelist_21.f90 except using spaces as seperators instead
4
! of commas. Developed from a test case provided by Christoph Jacob.
5
! Contributed by Jerry DeLisle  .
6
program pr24794
7
 
8
   implicit none
9
   integer, parameter :: maxop=15, iunit=7
10
   character*8 namea(maxop), nameb(maxop)
11
   integer i, ier
12
 
13
   namelist/ccsopr/ namea,nameb
14
   namea=""
15
   nameb=""
16
   open (12, status="scratch", delim="apostrophe")
17
   write (12, '(a)') "&ccsopr"
18
   write (12, '(a)') "    namea='spi01h' 'spi02o' 'spi03h' 'spi04o' 'spi05h'"
19
   write (12, '(a)') "          'spi07o' 'spi08h' 'spi09h'"
20
   write (12, '(a)') "    nameb='spi01h' 'spi03h' 'spi05h' 'spi06h' 'spi08h'"
21
   write (12, '(a)') "&end"
22
 
23
   rewind (12)
24
   read (12, nml=ccsopr, iostat=ier)
25
   if (ier.ne.0) call abort()
26
 
27
   rewind (12)
28
   write(12,nml=ccsopr)
29
 
30
   rewind (12)
31
   read (12, nml=ccsopr, iostat=ier)
32
   if (ier.ne.0) call abort()
33
   if (namea(2).ne."spi02o  ") call abort()
34
   if (namea(9).ne."        ") call abort()
35
   if (namea(15).ne."        ") call abort()
36
   if (nameb(1).ne."spi01h  ") call abort()
37
   if (nameb(6).ne."        ") call abort()
38
   if (nameb(15).ne."        ") call abort()
39
 
40
   close (12)
41
end program pr24794

powered by: WebSVN 2.1.0

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