Record edge true/false value for gcov
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / test_slice.f90
blob942d3a6497a7cc4858ef526881eabef5210533a7
1 ! Program to test handling of reduced rank array sections. This uncovered
2 ! bugs in simplify_shape and the scalarization of array sections.
3 program test_slice
4 implicit none
6 real (kind = 8), dimension(2, 2, 2) :: x
7 real (kind = 8) :: min, max
9 x = 1.0
10 if (minval(x(1, 1:2, 1:1)) .ne. 1.0) STOP 1
11 if (maxval(x(1, 1:2, 1:1)) .ne. 1.0) STOP 2
12 if (any (shape(x(1, 1:2, 1:1)) .ne. (/2, 1/))) STOP 3
14 if (any (shape(x(1, 1:2, 1)) .ne. (/2/))) STOP 4
15 if (any (shape(x(1:1, 1:2, 1:1)) .ne. (/1, 2, 1/))) STOP 5
17 end program test_slice