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 384 |
-- { dg-do run }
|
-- { dg-do run }
|
|
|
procedure Pack4 is
|
procedure Pack4 is
|
|
|
type Time_T is record
|
type Time_T is record
|
Hour : Integer;
|
Hour : Integer;
|
end record;
|
end record;
|
|
|
type Date_And_Time_T is record
|
type Date_And_Time_T is record
|
Date : Integer;
|
Date : Integer;
|
Time : Time_T;
|
Time : Time_T;
|
end record;
|
end record;
|
|
|
pragma Pack(Date_And_Time_T);
|
pragma Pack(Date_And_Time_T);
|
|
|
procedure
|
procedure
|
Assign_Hour_Of (T : out Time_T)
|
Assign_Hour_Of (T : out Time_T)
|
is
|
is
|
begin
|
begin
|
T.Hour := 44;
|
T.Hour := 44;
|
end;
|
end;
|
|
|
procedure
|
procedure
|
Clobber_Hour_Of (DT: out Date_And_Time_T)
|
Clobber_Hour_Of (DT: out Date_And_Time_T)
|
is
|
is
|
begin
|
begin
|
Assign_Hour_Of (Dt.Time);
|
Assign_Hour_Of (Dt.Time);
|
end;
|
end;
|
|
|
DT : Date_And_Time_T;
|
DT : Date_And_Time_T;
|
|
|
begin
|
begin
|
DT.Time.Hour := 22;
|
DT.Time.Hour := 22;
|
Clobber_Hour_Of (DT);
|
Clobber_Hour_Of (DT);
|
if DT.Time.Hour /= 44 then
|
if DT.Time.Hour /= 44 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.