URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 303 |
Rev 338 |
! Test generic interfaces declared in modules.
|
! Test generic interfaces declared in modules.
|
! We used to get the name mangling wrong for these.
|
! We used to get the name mangling wrong for these.
|
module module_interface_2
|
module module_interface_2
|
interface foo
|
interface foo
|
subroutine myfoo (i)
|
subroutine myfoo (i)
|
integer i
|
integer i
|
end subroutine
|
end subroutine
|
module procedure bar
|
module procedure bar
|
end interface
|
end interface
|
contains
|
contains
|
subroutine bar (r)
|
subroutine bar (r)
|
real r
|
real r
|
|
|
if (r .ne. 1.0) call abort ()
|
if (r .ne. 1.0) call abort ()
|
end subroutine
|
end subroutine
|
end module
|
end module
|
|
|
subroutine myfoo (i)
|
subroutine myfoo (i)
|
integer i
|
integer i
|
|
|
if (i .ne. 42) call abort ()
|
if (i .ne. 42) call abort ()
|
end subroutine
|
end subroutine
|
|
|
program test
|
program test
|
use module_interface_2
|
use module_interface_2
|
|
|
call foo (42)
|
call foo (42)
|
call foo (1.0)
|
call foo (1.0)
|
end program
|
end program
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.