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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [slice4.adb] - Blame information for rev 696

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do run }
2
 
3
procedure Slice4 is
4
 
5
   type Varray is array (1 .. 1) of Natural;  -- SImode
6
 
7
   type Rec is record
8
      Values : Varray;
9
   end record;
10
 
11
   type Sample is record
12
      Maybe  : Boolean;
13
      R : Rec;
14
   end record;
15
   pragma Pack (Sample);
16
 
17
   function Match (X, Y: Sample; Length : Positive) return Boolean is
18
   begin
19
      return X.R.Values (1 .. Length) = Y.R.Values (1 .. Length);
20
   end;
21
 
22
   X, Y : Sample := (Maybe => True, R => (Values => (1 => 1)));
23
begin
24
   X.Maybe := False;
25
   if not Match (X, Y, 1) then
26
      raise Program_Error;
27
   end if;
28
end;

powered by: WebSVN 2.1.0

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