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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR fortran/30720
3
program array_function_1
4
  integer :: a(5), b, l, u
5
  l = 4
6
  u = 2
7
 
8
  a = (/ 1, 2, 3, 4, 5 /)
9
 
10
  b = f(a(l:u) - 2)
11
  if (b /= 0) call abort
12
 
13
  b = f(a(4:2) - 2)
14
  if (b /= 0) call abort
15
 
16
  b = f(a(u:l) - 2)
17
  if (b /= 3) call abort
18
 
19
  b = f(a(2:4) - 2)
20
  if (b /= 3) call abort
21
 
22
  contains
23
    integer function f(x)
24
      integer, dimension(:), intent(in) :: x
25
      f = sum(x)
26
    end function
27
end program

powered by: WebSVN 2.1.0

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