RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / bounds_check_24.f90
blobd0251e8455b5d2455e797d2364605f8f64507b89
1 ! { dg-do compile }
2 ! { dg-additional-options "-fcheck=bounds -fdump-tree-original" }
4 ! PR fortran/113471 - wrong array bounds check
6 program pr113471
7 implicit none
8 type t
9 integer, dimension(2) :: c1 = 0
10 end type t
11 type(t) :: cc(7), bb(7)
12 integer :: kk = 1
14 ! no bounds check (can be determined at compile time):
15 call foo (cc(7)% c1)
17 ! bounds check involving kk, but no "outside of expected range"
18 call foo (bb(kk)% c1)
20 contains
21 subroutine foo (c)
22 integer, intent(in) :: c(:)
23 end
24 end
26 ! { dg-final { scan-tree-dump-times "below lower bound" 2 "original" } }
27 ! { dg-final { scan-tree-dump-times "above upper bound" 2 "original" } }
28 ! { dg-final { scan-tree-dump-not "outside of expected range" "original" } }