summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/discr8.adb
blob: cfb3d48e9d050bacc58b027ccf83c114caacbe7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-- { dg-do compile }
-- { dg-options "-gnatws" }

package body Discr8 is

  procedure Make (C : out Local_T) is
    Tmp : Local_T (Tag_One);
  begin
    C := Tmp;
  end;

  package Iteration is

    type Message_T is
      record
        S : Local_T;
      end record;

    type Iterator_T is
      record
        S : Local_T;
      end record;

    type Access_Iterator_T is access Iterator_T;

  end Iteration;

  package body Iteration is

    procedure Construct (Iterator : in out Access_Iterator_T;
                         Message  : Message_T) is
    begin
      Iterator.S := Message.S;
    end;

  end Iteration;

end Discr8;