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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

-- { dg-do run }
-- { dg-options "-O2" }
 
procedure Opt14 is
 
  type Rec is record
    I1, I2, I3 : Integer;
  end record;
 
  type Ptr is access Rec;
 
  P : Ptr := new Rec'(0,0,0);
 
  procedure Sub (R : In Out Rec) is
  begin
    R.I3 := R.I3 - 1;
  end;
 
begin
  P.all := (1,2,3);
  Sub (P.all);
  if P.all /= (1,2,2) 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.