OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [unaligned_rep_clause.adb] - Blame information for rev 304

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do compile }
2
 
3
procedure Unaligned_Rep_Clause is
4
 
5
   type One_Bit_Record is
6
      record
7
         B : Boolean;
8
      end record;
9
   Pragma Pack(One_Bit_Record);
10
 
11
   subtype Version_Number_Type is String (1 .. 3);
12
 
13
   type Inter is
14
      record
15
         Version : Version_Number_Type;
16
      end record;
17
 
18
   type Msg_Type is
19
      record
20
         Status  : One_Bit_Record;
21
         Version : Inter;
22
      end record;
23
 
24
   for Msg_Type use
25
      record
26
         Status  at 0 range 0 .. 0;
27
         Version at 0 range 1 .. 24;
28
      end record;
29
   for Msg_Type'Size use 25;
30
 
31
   Data : Msg_Type;
32
   Pragma Warnings (Off, Data);
33
   Version : Inter;
34
 
35
begin
36
   Version := Data.Version;
37
end;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.