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/] [pack5.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 Pack5 is
4
 
5
  type Kind is (v1, v2, v3);
6
 
7
  type Error (k : Kind := Kind'First) is record
8
    case k is
9
    when v1 =>
10
      null;
11
    when v2 =>
12
      null;
13
    when Others =>
14
      B : Boolean;
15
    end case;
16
  end record;
17
  pragma Pack (Error);
18
  for Error'Size use 16;
19
 
20
  No_Error: constant Error := (k => v2);
21
 
22
  type R (B : Boolean) is record
23
    E : Error;
24
  end record;
25
  pragma Pack(R);
26
  type Ptr is access R;
27
 
28
  C : Ptr := new R (True);
29
 
30
begin
31
  C.E := No_Error;
32
end;

powered by: WebSVN 2.1.0

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