URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [elemental_subroutine_7.f90] - Rev 312
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }
!
! PR fortran/38669
! Loop bounds temporaries used before being defined for elemental subroutines
!
! Original testcase by Harald Anlauf <anlauf@gmx.de>
program gfcbu84_main
implicit none
integer :: jplev, k_lev
integer :: p(42)
real :: r(42)
integer, pointer :: q(:)
jplev = 42
k_lev = 1
call random_number (r)
p = 41 * r + 1
allocate (q(jplev))
q = 0
call tq_tvgh (q(k_lev:), p(k_lev:))
if (any (p /= q)) call abort
q = 0
call tq_tvgh (q(k_lev:), (p(k_lev:)))
if (any (p /= q)) call abort
q = 0
call tq_tvgh (q(k_lev:), (p(p(k_lev:))))
if (any (p(p) /= q)) call abort
deallocate (q)
contains
elemental subroutine tq_tvgh (t, p)
integer ,intent (out) :: t
integer ,intent (in) :: p
t=p
end subroutine tq_tvgh
end program gfcbu84_main
Go to most recent revision | Compare with Previous | Blame | View Log