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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do run }
2
-- { dg-options "-O2" }
3
 
4
procedure Opt14 is
5
 
6
  type Rec is record
7
    I1, I2, I3 : Integer;
8
  end record;
9
 
10
  type Ptr is access Rec;
11
 
12
  P : Ptr := new Rec'(0,0,0);
13
 
14
  procedure Sub (R : In Out Rec) is
15
  begin
16
    R.I3 := R.I3 - 1;
17
  end;
18
 
19
begin
20
  P.all := (1,2,3);
21
  Sub (P.all);
22
  if P.all /= (1,2,2) then
23
    raise Program_Error;
24
  end if;
25
end;

powered by: WebSVN 2.1.0

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