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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [pack5.adb] - Rev 801

Go to most recent revision | 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;
 

Go to most recent revision | 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.