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 304 |
Rev 384 |
-- { dg-do run }
|
-- { dg-do run }
|
|
|
with Text_IO; use Text_IO;
|
with Text_IO; use Text_IO;
|
procedure Named_Test is
|
procedure Named_Test is
|
type Base is tagged limited record
|
type Base is tagged limited record
|
Flag : boolean;
|
Flag : boolean;
|
Value : integer;
|
Value : integer;
|
end record;
|
end record;
|
--
|
--
|
function Build (X : Integer; Y : Integer) return Base is
|
function Build (X : Integer; Y : Integer) return Base is
|
begin
|
begin
|
return Result : Base do
|
return Result : Base do
|
Result.Flag := (X = Y);
|
Result.Flag := (X = Y);
|
Result.Value := X * Y;
|
Result.Value := X * Y;
|
end return;
|
end return;
|
end;
|
end;
|
--
|
--
|
type Table is array (1..1) of Base;
|
type Table is array (1..1) of Base;
|
It : Table := (1 => Build ( Y => 17, X => 11));
|
It : Table := (1 => Build ( Y => 17, X => 11));
|
begin
|
begin
|
if It (1).Flag
|
if It (1).Flag
|
or else It (1).Value /= 187
|
or else It (1).Value /= 187
|
then
|
then
|
raise Program_Error;
|
raise Program_Error;
|
end if;
|
end if;
|
end;
|
end;
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.