URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
! { dg-do compile }
|
! { dg-do compile }
|
! Test the patch for PR25098, where passing a variable as an
|
! Test the patch for PR25098, where passing a variable as an
|
! actual argument to a formal argument that is a procedure
|
! actual argument to a formal argument that is a procedure
|
! went undiagnosed.
|
! went undiagnosed.
|
!
|
!
|
! Based on contribution by Joost VandeVondele
|
! Based on contribution by Joost VandeVondele
|
!
|
!
|
integer function y()
|
integer function y()
|
y = 1
|
y = 1
|
end
|
end
|
integer function z()
|
integer function z()
|
z = 1
|
z = 1
|
end
|
end
|
|
|
module m1
|
module m1
|
contains
|
contains
|
subroutine s1(f)
|
subroutine s1(f)
|
interface
|
interface
|
function f()
|
function f()
|
integer f
|
integer f
|
end function f
|
end function f
|
end interface
|
end interface
|
end subroutine s1
|
end subroutine s1
|
end module m1
|
end module m1
|
|
|
use m1
|
use m1
|
external y
|
external y
|
interface
|
interface
|
function x()
|
function x()
|
integer x
|
integer x
|
end function x
|
end function x
|
end interface
|
end interface
|
|
|
integer :: i, y, z
|
integer :: i, y, z
|
i=1
|
i=1
|
call s1(i) ! { dg-error "Expected a procedure for argument" }
|
call s1(i) ! { dg-error "Expected a procedure for argument" }
|
call s1(w) ! { dg-error "not allowed as an actual argument" }
|
call s1(w) ! { dg-error "not allowed as an actual argument" }
|
call s1(x) ! explicit interface
|
call s1(x) ! explicit interface
|
call s1(y) ! declared external
|
call s1(y) ! declared external
|
call s1(z) ! { dg-error "Expected a procedure for argument" }
|
call s1(z) ! { dg-error "Expected a procedure for argument" }
|
contains
|
contains
|
integer function w()
|
integer function w()
|
w = 1
|
w = 1
|
end function w
|
end function w
|
end
|
end
|
|
|
! { dg-final { cleanup-modules "m1" } }
|
! { dg-final { cleanup-modules "m1" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.