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

Subversion Repositories openrisc

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

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 "-fbounds-check" }
3
! { dg-shouldfail "Array bound checking" }
4
! PR fortran/33745
5
!
6
! Don't check upper bound of assumed-size array
7
!
8
 
9
program test
10
 implicit none
11
 integer, parameter :: maxss=7,maxc=8
12
 integer :: jp(2,maxc)
13
 call findphase(jp)
14
contains
15
  subroutine findphase(jp)
16
    integer, intent(out) :: jp(2,*)
17
    jp(2,2:4)=0
18
    jp(2,0:4)=0 ! { dg-warning "out of bounds" }
19
    jp(3,1:4)=0 ! { dg-warning "out of bounds" }
20
  end subroutine
21
end program test
22
 
23
! { dg-output "At line 18 of file .*" }
24
! { dg-output "Index '0' of dimension 2 of array 'jp' below lower bound of 1" }
25
 

powered by: WebSVN 2.1.0

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