PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / bound_simplification_1.f90
blob69ad6e7336695cd398d4050b7f1bbe3446f258da
1 ! { dg-do run }
2 ! { dg-options "" }
3 implicit none
4 real :: f(10,10,10,3,4)
5 integer, parameter :: upper(5) = ubound(f), lower(5) = lbound (f)
6 integer :: varu(5), varl(5)
8 varu(:) = ubound(f)
9 varl(:) = lbound(f)
10 if (any (varu /= upper)) STOP 1
11 if (any (varl /= lower)) STOP 2
13 call check (f, upper, lower)
14 call check (f, ubound(f), lbound(f))
16 contains
18 subroutine check (f, upper, lower)
19 implicit none
20 integer :: upper(5), lower(5)
21 real :: f(:,:,:,:,:)
23 if (any (ubound(f) /= upper)) STOP 3
24 if (any (lbound(f) /= lower)) STOP 4
25 end subroutine check
27 end