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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [do_check_3.f90] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! { dg-options "-fcheck=do" }
3
! { dg-shouldfail "DO check" }
4
!
5
! PR fortran/34656
6
! Run-time check for modifing loop variables
7
!
8
program test
9
  implicit none
10
  real :: i, j, k
11
  j = 10.0
12
  k = 1.0
13
  do i = 1.0, j, k ! { dg-warning "must be integer" }
14
    call modLoopVar(i)
15
  end do
16
contains
17
  subroutine modLoopVar(x)
18
    real :: x
19
    x = x + 1
20
  end subroutine modLoopVar
21
end program test
22
! { dg-output "Fortran runtime error: Loop variable has been modified" }

powered by: WebSVN 2.1.0

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