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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

-- { dg-do run }
-- { dg-options "-gnatws" }
 
procedure Alignment9 is
 
  type Kind is (Small, Large);
  for Kind'Size use 8;
 
  type Header is
    record
      K : Kind;
      I : Integer;
    end record;
 
  for Header use
    record
      K at 4 range 0..7;
      I at 0 range 0..31;
    end record;
 
  for Header'Size use 5*8;
  for Header'Alignment use 1;
 
  H : Header;
 
begin
  if H'Size /= 40 then
    raise Program_Error;
  end if;
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.