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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gfortran.dg/] [fmt_t_2.f90] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
! { dg-options "" }
2
! { dg-do run }
3
! pr24699, handle end-of-record on READ with T format
4
! test contributed by Jerry DeLisle 
5
      character*132 :: foost1, foost2, foost3
6
      open (11, status="scratch", action="readwrite")
7
      write(11, '(a)') "ab cdefghijkl mnop qrst"
8
      write(11, '(a)') "123456789 123456789 123456789"
9
      write(11, '(a)') "  Now is the time for all good."
10
      rewind(11)
11
 
12
      read (11, '(a040,t1,040a)', end = 999)  foost1 , foost2
13
      if (foost1.ne.foost2) call abort()
14
 
15
      read (11, '(a032,t2,a032t3,a032)', end = 999)  foost1 , foost2, foost3
16
      if (foost1(1:32).ne."123456789 123456789 123456789   ") call abort()
17
      if (foost2(1:32).ne."23456789 123456789 123456789    ") call abort()
18
      if (foost3(1:32).ne."3456789 123456789 123456789     ") call abort()
19
 
20
      read (11, '(a017,t1,a0017)', end = 999)  foost1 , foost2
21
      if (foost1.ne.foost2) call abort()
22
      if (foost2(1:17).ne."  Now is the time ") call abort()
23
      goto 1000
24
 999  call abort()
25
 1000 continue
26
      close(11)
27
      end

powered by: WebSVN 2.1.0

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