OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [vector_subscript_5.f90] - Blame information for rev 302

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
!
3
! Test the fix for PR37749 in which the expression in line 13 would cause an ICE
4
! because the upper value of the loop range was not set.
5
!
6
! Contributed by Jakub Jelinek 
7
!
8
subroutine subr (m, n, a, b, c, d, p)
9
  implicit none
10
  integer m, n
11
  real a(m,n), b(m,n), c(n,n), d(m,n)
12
  integer p(n)
13
  d = a(:,p) - matmul(b, c)
14
end subroutine
15
 
16
  implicit none
17
  integer i
18
  real a(3,2), b(3,2), c(2,2), d(3,2)
19
  integer p(2)
20
  a = reshape ((/(i, i = 1, 6)/), (/3, 2/))
21
  b = 1
22
  c = 2
23
  p = 2
24
  call subr (3, 2, a, b, c, d, p)
25
  if (any (d .ne. reshape ((/(mod (i + 2, 3), i = 1, 6)/), (/3, 2/)))) call abort
26
end

powered by: WebSVN 2.1.0

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