OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [do_check_3.f90] - Diff between revs 302 and 384

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do run }
! { dg-do run }
! { dg-options "-fcheck=do" }
! { dg-options "-fcheck=do" }
! { dg-shouldfail "DO check" }
! { dg-shouldfail "DO check" }
!
!
! PR fortran/34656
! PR fortran/34656
! Run-time check for modifing loop variables
! Run-time check for modifing loop variables
!
!
program test
program test
  implicit none
  implicit none
  real :: i, j, k
  real :: i, j, k
  j = 10.0
  j = 10.0
  k = 1.0
  k = 1.0
  do i = 1.0, j, k ! { dg-warning "must be integer" }
  do i = 1.0, j, k ! { dg-warning "must be integer" }
    call modLoopVar(i)
    call modLoopVar(i)
  end do
  end do
contains
contains
  subroutine modLoopVar(x)
  subroutine modLoopVar(x)
    real :: x
    real :: x
    x = x + 1
    x = x + 1
  end subroutine modLoopVar
  end subroutine modLoopVar
end program test
end program test
! { dg-output "Fortran runtime error: Loop variable has been modified" }
! { 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.