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/] [slice4.adb] - Blame information for rev 304

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 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.