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] - Rev 304

Compare with Previous | Blame | View Log

-- { dg-do compile }
 
procedure Pack5 is
 
  type Kind is (v1, v2, v3);
 
  type Error (k : Kind := Kind'First) is record
    case k is
    when v1 =>
      null;
    when v2 =>
      null;
    when Others =>
      B : Boolean;
    end case;
  end record;
  pragma Pack (Error);
  for Error'Size use 16;
 
  No_Error: constant Error := (k => v2);
 
  type R (B : Boolean) is record
    E : Error;
  end record;
  pragma Pack(R);
  type Ptr is access R;
 
  C : Ptr := new R (True);
 
begin
  C.E := No_Error;
end;
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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