URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 303 |
Rev 384 |
module entry_8_m
|
module entry_8_m
|
type t
|
type t
|
integer i
|
integer i
|
real x (5)
|
real x (5)
|
end type t
|
end type t
|
end module entry_8_m
|
end module entry_8_m
|
|
|
function f (i)
|
function f (i)
|
use entry_8_m
|
use entry_8_m
|
type (t) :: f,g
|
type (t) :: f,g
|
f % i = i
|
f % i = i
|
return
|
return
|
entry g (x)
|
entry g (x)
|
g%x = x
|
g%x = x
|
end function f
|
end function f
|
|
|
use entry_8_m
|
use entry_8_m
|
type (t) :: f, g, res
|
type (t) :: f, g, res
|
|
|
res = f (42)
|
res = f (42)
|
if (res%i /= 42) call abort ()
|
if (res%i /= 42) call abort ()
|
res = g (1.)
|
res = g (1.)
|
if (any (res%x /= 1.)) call abort ()
|
if (any (res%x /= 1.)) call abort ()
|
end
|
end
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.