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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do compile }
2
-- { dg-options "-gnato" }
3
 
4
procedure Dynamic_Bound is
5
 
6
  procedure Define (Count : Integer) is
7
 
8
    type Count_T is new Integer range 0 .. Count * 1000;
9
 
10
    type Obj_T is record
11
      Count : Count_T;
12
    end record;
13
 
14
    type T is access Obj_T ;
15
 
16
    procedure Create (S : in out T) is
17
    begin
18
      S := new Obj_T'(Count => 0);
19
    end;
20
 
21
    procedure Add (To : in out T) is
22
    begin
23
      To.Count := To.Count + 1;
24
    end;
25
 
26
    My_T : T;
27
 
28
  begin
29
    Create (My_T);
30
  end;
31
 
32
begin
33
  Define (1);
34
end;

powered by: WebSVN 2.1.0

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