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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gnat.dg/] [self_aggregate_with_call.adb] - Blame information for rev 455

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

Line No. Rev Author Line
1 149 jeremybenn
-- { dg-do run }
2
-- { dg-options "-O2" }
3
 
4
procedure self_aggregate_with_call is
5
 
6
   type Values is array (1 .. 8) of Natural;
7
 
8
   type Vector is record
9
      Components : Values;
10
   end record;
11
 
12
   function Clone (Components: Values) return Values is
13
   begin
14
      return Components;
15
   end;
16
 
17
   procedure Process (V : in out Vector) is
18
   begin
19
      V.Components (Values'First) := 1;
20
      V := (Components => Clone (V.Components));
21
 
22
      if V.Components (Values'First) /= 1 then
23
         raise Program_Error;
24
      end if;
25
   end;
26
 
27
   V : Vector;
28
begin
29
   Process (V);
30
end;

powered by: WebSVN 2.1.0

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