URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 303 |
Rev 338 |
! Test alternate entry points for functions when the result types
|
! Test alternate entry points for functions when the result types
|
! of all entry points match
|
! of all entry points match
|
|
|
function f1 (a)
|
function f1 (a)
|
integer a, f1, e1
|
integer a, f1, e1
|
f1 = 15 + a
|
f1 = 15 + a
|
return
|
return
|
entry e1
|
entry e1
|
e1 = 42
|
e1 = 42
|
end function
|
end function
|
function f2 ()
|
function f2 ()
|
real f2, e2
|
real f2, e2
|
entry e2
|
entry e2
|
e2 = 45
|
e2 = 45
|
end function
|
end function
|
|
|
program entrytest
|
program entrytest
|
integer f1, e1
|
integer f1, e1
|
real f2, e2
|
real f2, e2
|
if (f1 (6) .ne. 21) call abort ()
|
if (f1 (6) .ne. 21) call abort ()
|
if (e1 () .ne. 42) call abort ()
|
if (e1 () .ne. 42) call abort ()
|
if (f2 () .ne. 45) call abort ()
|
if (f2 () .ne. 45) call abort ()
|
if (e2 () .ne. 45) call abort ()
|
if (e2 () .ne. 45) call abort ()
|
end
|
end
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.