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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/38669
4
! Loop bounds temporaries used before being defined for elemental subroutines
5
!
6
! Original testcase by Harald Anlauf 
7
 
8
program gfcbu84_main
9
  implicit none
10
  integer           :: jplev, k_lev
11
  integer :: p(42)
12
  real    :: r(42)
13
  integer, pointer :: q(:)
14
  jplev = 42
15
  k_lev = 1
16
  call random_number (r)
17
  p = 41 * r + 1
18
  allocate (q(jplev))
19
 
20
  q = 0
21
  call tq_tvgh (q(k_lev:), p(k_lev:))
22
  if (any (p /= q)) call abort
23
 
24
  q = 0
25
  call tq_tvgh (q(k_lev:), (p(k_lev:)))
26
  if (any (p /= q)) call abort
27
 
28
  q = 0
29
  call tq_tvgh (q(k_lev:), (p(p(k_lev:))))
30
  if (any (p(p) /= q)) call abort
31
 
32
  deallocate (q)
33
 
34
  contains
35
  elemental subroutine tq_tvgh (t, p)
36
    integer ,intent (out)            :: t
37
    integer ,intent (in)             :: p
38
    t=p
39
  end subroutine tq_tvgh
40
end program gfcbu84_main

powered by: WebSVN 2.1.0

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