URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 302 |
Rev 384 |
! { dg-do run }
|
! { dg-do run }
|
!
|
!
|
! This tests the (partial) fix for PR35830, i.e. handling array arguments
|
! This tests the (partial) fix for PR35830, i.e. handling array arguments
|
! with the PROCEDURE statement.
|
! with the PROCEDURE statement.
|
!
|
!
|
! Contributed by Janus Weil
|
! Contributed by Janus Weil
|
|
|
module m
|
module m
|
contains
|
contains
|
subroutine one(a)
|
subroutine one(a)
|
integer a(1:3)
|
integer a(1:3)
|
if (any(a /= [1,2,3])) call abort()
|
if (any(a /= [1,2,3])) call abort()
|
end subroutine one
|
end subroutine one
|
end module m
|
end module m
|
|
|
program test
|
program test
|
use m
|
use m
|
implicit none
|
implicit none
|
call foo(one)
|
call foo(one)
|
contains
|
contains
|
subroutine foo(f)
|
subroutine foo(f)
|
procedure(one) :: f
|
procedure(one) :: f
|
call f([1,2,3])
|
call f([1,2,3])
|
end subroutine foo
|
end subroutine foo
|
end program test
|
end program test
|
|
|
! { dg-final { cleanup-modules "m" } }
|
! { dg-final { cleanup-modules "m" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.