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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-std=legacy" }
3
!
4
! Tests the fix for pr32613 - see:
5
! http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/495c154ee188d7f1/ea292134fe68b1d0#ea292134fe68b1d0
6
!
7
! Contributed by Al Greynolds 
8
!
9
program main
10
  call something
11
end
12
 
13
subroutine something
14
!  integer i !correct results from gfortran depend on this statement (before fix)
15
  integer :: m = 0
16
  character lit*1, line*100
17
  lit(i) = line(i:i)
18
  i = 1
19
  n = 5
20
  line = 'PZ0R1'
21
  if (internal (1)) call abort ()
22
  if (m .ne. 4) call abort ()
23
contains
24
  logical function internal (j)
25
    intent(in) j
26
    do i = j, n
27
      k = index ('RE', lit (i))
28
      m = m + 1
29
      if (k == 0) cycle
30
      if (i + 1 == n) exit
31
    enddo
32
    internal = (k == 0)
33
  end function
34
end

powered by: WebSVN 2.1.0

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