URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 304 |
Rev 338 |
-- { dg-do run }
|
-- { dg-do run }
|
with Interfaces; use Interfaces;
|
with Interfaces; use Interfaces;
|
procedure Exp0_Eval is
|
procedure Exp0_Eval is
|
|
|
F_Count : Natural := 0;
|
F_Count : Natural := 0;
|
|
|
function F return Integer is
|
function F return Integer is
|
begin
|
begin
|
F_Count := F_Count + 1;
|
F_Count := F_Count + 1;
|
return 1;
|
return 1;
|
end F;
|
end F;
|
|
|
function F return Unsigned_32 is
|
function F return Unsigned_32 is
|
begin
|
begin
|
F_Count := F_Count + 1;
|
F_Count := F_Count + 1;
|
return 1;
|
return 1;
|
end F;
|
end F;
|
|
|
R : constant Integer :=
|
R : constant Integer :=
|
F ** 0 +
|
F ** 0 +
|
F * 0 +
|
F * 0 +
|
0 * F +
|
0 * F +
|
Integer (Unsigned_32'(F) mod 1) +
|
Integer (Unsigned_32'(F) mod 1) +
|
Integer (Unsigned_32'(F) rem 1);
|
Integer (Unsigned_32'(F) rem 1);
|
pragma Warnings (Off, R);
|
pragma Warnings (Off, R);
|
begin
|
begin
|
if F_Count /= 5 then
|
if F_Count /= 5 then
|
raise Program_Error
|
raise Program_Error
|
with "incorrect numbers of calls to F:" & F_Count'Img;
|
with "incorrect numbers of calls to F:" & F_Count'Img;
|
end if;
|
end if;
|
end Exp0_Eval;
|
end Exp0_Eval;
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.