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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gnat.dg/] [self_aggregate_with_pointer.adb] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 jeremybenn
-- { dg-do run }
2
 
3
procedure self_aggregate_with_pointer is
4
 
5
  type Arr is array (Natural range <>) of Integer;
6
 
7
  type Rec (N : Natural) is record
8
    A : Arr (1..N);
9
  end record;
10
 
11
  type Acc_Rec is access all Rec;
12
 
13
  type SRec is record
14
    A : Acc_Rec;
15
    I1, I2, I3, I4, I5, I6, I7: Integer;
16
  end record;
17
 
18
  R : aliased Rec (1);
19
  S : Srec := (A => R'Access, others => 0);
20
 
21
begin
22
  S := (A => S.A, others => 0);
23
  if S.A /= R'Access then
24
    raise Program_Error;
25
  end if;
26
end;

powered by: WebSVN 2.1.0

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