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 }
|
! Tests the fix for PRs 19358, 19477, 21211 and 21622.
|
! Tests the fix for PRs 19358, 19477, 21211 and 21622.
|
!
|
!
|
! Note that this tests only the valid cases with explicit interfaces.
|
! Note that this tests only the valid cases with explicit interfaces.
|
!
|
!
|
! Contributed by Paul Thomas
|
! Contributed by Paul Thomas
|
!
|
!
|
module global
|
module global
|
contains
|
contains
|
SUBROUTINE goo (x, i)
|
SUBROUTINE goo (x, i)
|
REAL, DIMENSION(i:) :: x
|
REAL, DIMENSION(i:) :: x
|
integer :: i
|
integer :: i
|
x (3) = 99.0
|
x (3) = 99.0
|
END SUBROUTINE goo
|
END SUBROUTINE goo
|
end module global
|
end module global
|
|
|
SUBROUTINE foo (x, i)
|
SUBROUTINE foo (x, i)
|
REAL, DIMENSION(i:) :: x
|
REAL, DIMENSION(i:) :: x
|
integer :: i
|
integer :: i
|
x (4) = 42.0
|
x (4) = 42.0
|
END SUBROUTINE foo
|
END SUBROUTINE foo
|
|
|
program test
|
program test
|
use global
|
use global
|
real, dimension(3) :: y = 0
|
real, dimension(3) :: y = 0
|
integer :: j = 2
|
integer :: j = 2
|
|
|
interface
|
interface
|
SUBROUTINE foo (x, i)
|
SUBROUTINE foo (x, i)
|
REAL, DIMENSION(i:) :: x
|
REAL, DIMENSION(i:) :: x
|
integer :: i
|
integer :: i
|
END SUBROUTINE foo
|
END SUBROUTINE foo
|
end interface
|
end interface
|
call foo (y, j)
|
call foo (y, j)
|
call goo (y, j)
|
call goo (y, j)
|
call roo (y, j)
|
call roo (y, j)
|
if (any(y.ne.(/21.0, 99.0, 42.0/))) call abort ()
|
if (any(y.ne.(/21.0, 99.0, 42.0/))) call abort ()
|
contains
|
contains
|
SUBROUTINE roo (x, i)
|
SUBROUTINE roo (x, i)
|
REAL, DIMENSION(i:) :: x
|
REAL, DIMENSION(i:) :: x
|
integer :: i
|
integer :: i
|
x (2) = 21.0
|
x (2) = 21.0
|
END SUBROUTINE roo
|
END SUBROUTINE roo
|
end program test
|
end program test
|
|
|
! { dg-final { cleanup-modules "global" } }
|
! { dg-final { cleanup-modules "global" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.