OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gnat.dg/] [slice4.adb] - Diff between revs 304 and 338

Only display areas with differences | Details | Blame | View Log

Rev 304 Rev 338
-- { dg-do run }
-- { dg-do run }
 
 
procedure Slice4 is
procedure Slice4 is
 
 
   type Varray is array (1 .. 1) of Natural;  -- SImode
   type Varray is array (1 .. 1) of Natural;  -- SImode
 
 
   type Rec is record
   type Rec is record
      Values : Varray;
      Values : Varray;
   end record;
   end record;
 
 
   type Sample is record
   type Sample is record
      Maybe  : Boolean;
      Maybe  : Boolean;
      R : Rec;
      R : Rec;
   end record;
   end record;
   pragma Pack (Sample);
   pragma Pack (Sample);
 
 
   function Match (X, Y: Sample; Length : Positive) return Boolean is
   function Match (X, Y: Sample; Length : Positive) return Boolean is
   begin
   begin
      return X.R.Values (1 .. Length) = Y.R.Values (1 .. Length);
      return X.R.Values (1 .. Length) = Y.R.Values (1 .. Length);
   end;
   end;
 
 
   X, Y : Sample := (Maybe => True, R => (Values => (1 => 1)));
   X, Y : Sample := (Maybe => True, R => (Values => (1 => 1)));
begin
begin
   X.Maybe := False;
   X.Maybe := False;
   if not Match (X, Y, 1) then
   if not Match (X, Y, 1) then
      raise Program_Error;
      raise Program_Error;
   end if;
   end if;
end;
end;
 
 

powered by: WebSVN 2.1.0

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