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_2.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fbounds-check" }
3
 
4
      integer, parameter :: nx = 3, ny = 4
5
 
6
      integer :: i, j, too_big
7
 
8
      integer, parameter, dimension(nx,ny) :: p = &
9
        reshape((/ (i*i, i=1,size(p)) /), shape(p))
10
 
11
      integer, dimension(nx,ny) :: a
12
 
13
      integer, dimension(:), allocatable :: c
14
 
15
 
16
      allocate(c(ny))
17
 
18
      a = p
19
      too_big = nx + 1
20
 
21
      c = sum(a(1:too_big,:),2)
22
      end
23
! { dg-shouldfail "outside of expected range" }

powered by: WebSVN 2.1.0

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