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/] [pack10.adb] - Blame information for rev 318

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do run }
2
 
3
procedure Pack10 is
4
 
5
  type U16 is mod 2**16;
6
  type U8 is mod 2**8;
7
 
8
  type R is record
9
    A : U16;
10
    B : U8;
11
  end record;
12
 
13
  type M is array (1..2) of R;
14
  pragma Pack (M);
15
  -- This size clause can actually be omitted
16
  for M'Size use 48;
17
 
18
  type R2 is record
19
    C : M;
20
    D : U8;
21
  end record;
22
  for R2 use record
23
    C at 0 range 0 .. 24*2-1;
24
  end record;
25
 
26
  My_R2 : R2;
27
 
28
begin
29
  My_R2.D := 1;
30
  My_R2.C(2).B := 0;
31
  if My_R2.D /=1 then
32
    raise Program_Error;
33
  end if;
34
end;

powered by: WebSVN 2.1.0

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