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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [fmt_cache_2.f] - Blame information for rev 774

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR42742 Handle very large format strings correctly
3
! Test derived from example developed by Manfred Schwarb.
4
      character(12) bufarr(74)
5
      character(74*13+30) fmtstr,fmtstr2
6
      character(1) delim
7
      integer i,j,dat(5),pindx, loopcounter
8
      character(983) big_string ! any less and this test fails.
9
 
10
      do i=1,74
11
        write(bufarr(i),'(i12)') i
12
      enddo
13
 
14
      delim=" "
15
      dat(1)=2009
16
      dat(2)=10
17
      dat(3)=31
18
      dat(4)=3
19
      dat(5)=0
20
      fmtstr="(i2,i6,4(a1,i2.2)"
21
      open(10, status="scratch")
22
      do j=1,74
23
        fmtstr=fmtstr(1:len_trim(fmtstr))//",a1,a12"
24
        fmtstr2=fmtstr(1:len_trim(fmtstr))//")"
25
c        write(0,*) "interation ",j,": ",len_trim(fmtstr2)
26
        do i=1,10
27
          write(10,fmtstr2)
28
     &           i,dat(1),"-",dat(2),"-",dat(3),
29
     &           delim,dat(4),":",dat(5),
30
     &           (delim,bufarr(pindx),pindx=1,j)
31
        enddo
32
        loopcounter = j
33
      enddo
34
      close(10)
35
      if (loopcounter /= 74) call abort
36
      end

powered by: WebSVN 2.1.0

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