OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [test_slice.f90] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
! 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) call abort ()
11
  if (maxval(x(1, 1:2, 1:1)) .ne. 1.0) call abort ()
12
  if (any (shape(x(1, 1:2, 1:1)) .ne. (/2, 1/))) call abort ()
13
 
14
  if (any (shape(x(1, 1:2, 1)) .ne. (/2/))) call abort ()
15
  if (any (shape(x(1:1, 1:2, 1:1)) .ne. (/1, 2, 1/))) call abort ()
16
 
17
end program test_slice

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.