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 Packed_Subtype is
|
procedure Packed_Subtype is
|
|
|
subtype Ubyte is Integer range 0 .. 255;
|
subtype Ubyte is Integer range 0 .. 255;
|
type Packet (Id : Ubyte) is record
|
type Packet (Id : Ubyte) is record
|
A, B : Ubyte;
|
A, B : Ubyte;
|
end record;
|
end record;
|
pragma Pack (Packet);
|
pragma Pack (Packet);
|
|
|
subtype My_Packet is Packet (Id => 1);
|
subtype My_Packet is Packet (Id => 1);
|
|
|
MP : My_Packet;
|
MP : My_Packet;
|
begin
|
begin
|
MP.A := 1;
|
MP.A := 1;
|
MP.B := 2;
|
MP.B := 2;
|
|
|
if MP.A /= 1 or else MP.B /= 2 then
|
if MP.A /= 1 or else MP.B /= 2 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.