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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [dim_range_1.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! PR 44693 - check for invalid dim even in functions.
3
! Based on a test case by Dominique d'Humieres.
4
subroutine test1(esss,Ix,Iyz, n)
5
  real(kind=kind(1.0d0)), dimension(n), intent(out) :: esss
6
  real(kind=kind(1.0d0)), dimension(n,n,n) :: sp
7
  real(kind=kind(1.0d0)), dimension(n,n) :: Ix,Iyz
8
  esss = sum(Ix * Iyz, 0) ! { dg-error "is not a valid dimension index" }
9
  esss = sum(Ix * Iyz, 1)
10
  esss = sum(Ix * Iyz, 2)
11
  esss = sum(Ix * Iyz, 3) ! { dg-error "is not a valid dimension index" }
12
  sp = spread (ix * iyz, 0, n) ! { dg-error "is not a valid dimension index" }
13
  sp = spread (ix * iyz, 1, n)
14
  sp = spread (ix * iyz, 2, n)
15
  sp = spread (ix * iyz, 3, n)
16
  sp = spread (ix * iyz, 4, n) ! { dg-error "is not a valid dimension index" }
17
end subroutine

powered by: WebSVN 2.1.0

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