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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [namelist_21.f90] - Blame information for rev 318

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

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

powered by: WebSVN 2.1.0

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