summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/self.ads
blob: 1837188ab9526f03490055b2a634ab277a902fb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
with System; 
package Self is 
  type Lim is limited private;
  type Lim_Ref is access all Lim;
  function G (X : Integer) return lim;

  procedure Change (X : in out Lim; Incr : Integer);
  function Get (X : Lim) return Integer;
private 
  type Lim is limited record
     Comp : Integer;
     Self_Default : Lim_Ref := Lim'Unchecked_Access;
     Self_Unrestricted_Default : Lim_Ref := Lim'Unrestricted_Access;
     Self_Anon_Default : access Lim := Lim'Unchecked_Access;
     Self_Anon_Unrestricted_Default : access Lim := Lim'Unrestricted_Access;
  end record; 
end Self;