c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / bound_simplification_3.f90
blob66ed5f11c8ba96d79041fae2282cf22ce75b9527
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! PR fortran/54208
5 ! The I and J definitions used to raise an error because ARR's array spec
6 ! was resolved to late for the LBOUND and UBOUND calls to be simplified to
7 ! a constant.
9 ! Contributed by Carlos A. Cruz <carlos.a.cruz@nasa.gov>
11 program testit
12 integer, parameter :: n=2
13 integer, dimension(1-min(n,2)/2:n) :: arr
14 integer, parameter :: i=lbound(arr,1)
15 integer, parameter :: j=ubound(arr,1)
16 ! write(6,*) i, j
17 if (i /= 0) STOP 1
18 if (j /= 2) STOP 2
19 end program testit
21 ! { dg-final { scan-tree-dump-times "bound" 0 "original" } }
22 ! { dg-final { scan-tree-dump-times "_gfortran_stop" 0 "original" } }