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

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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