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/] [small_alignment.adb] - Rev 304

Compare with Previous | Blame | View Log

-- { dg-do run }
-- { dg-options "-gnatws" }
 
procedure Small_Alignment is
 
  type My_Integer is new Integer;
  for My_Integer'Alignment use 1;
 
  function Set_A return My_Integer is
  begin
    return 12;
  end;
 
  function Set_B return My_Integer is
  begin
    return 6;
  end;
 
  C : Character;
  A : My_Integer := Set_A;
  B : My_Integer := Set_B;
 
begin
  A := A * B / 2;
  if A /= 36 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.