| 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 |
| 5 |
|
| 6 |
real (kind = 8), dimension(2, 2, 2) :: x |
| 7 |
real (kind = 8) :: min, max |
| 8 |
|
| 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 |
| 13 |
|
| 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 |
| 16 |
|
| 17 |
end program test_slice |