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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [inline_sum_bounds_check_1.f90] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do run }
! { dg-options "-fbounds-check" }

      integer, parameter :: nx = 3, ny = 4

      integer :: i, j, too_big

      integer, parameter, dimension(nx,ny) :: p = &
        reshape((/ (i*i, i=1,size(p)) /), shape(p))

      integer, dimension(nx,ny) :: a

      integer, dimension(:), allocatable :: b

      allocate(b(nx))

      a = p
      too_big = ny + 1

      b = sum(a(:,1:too_big),2)
      end
! { dg-shouldfail "outside of expected range" }

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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