blob: 1d271ba5cd91ce4c49937d2b75d0c3179d86160d [file] [log] [blame]
-- { dg-do run }
with Text_IO; use Text_IO;
procedure Named_Test is
type Base is tagged limited record
Flag : boolean;
Value : integer;
end record;
--
function Build (X : Integer; Y : Integer) return Base is
begin
return Result : Base do
Result.Flag := (X = Y);
Result.Value := X * Y;
end return;
end;
--
type Table is array (1..1) of Base;
It : Table := (1 => Build ( Y => 17, X => 11));
begin
if It (1).Flag
or else It (1).Value /= 187
then
raise Program_Error;
end if;
end;