PR target/84336
[official-gcc.git] / gcc / testsuite / gnat.dg / discr8.adb
blobcfb3d48e9d050bacc58b027ccf83c114caacbe7d
1 -- { dg-do compile }
2 -- { dg-options "-gnatws" }
4 package body Discr8 is
6 procedure Make (C : out Local_T) is
7 Tmp : Local_T (Tag_One);
8 begin
9 C := Tmp;
10 end;
12 package Iteration is
14 type Message_T is
15 record
16 S : Local_T;
17 end record;
19 type Iterator_T is
20 record
21 S : Local_T;
22 end record;
24 type Access_Iterator_T is access Iterator_T;
26 end Iteration;
28 package body Iteration is
30 procedure Construct (Iterator : in out Access_Iterator_T;
31 Message : Message_T) is
32 begin
33 Iterator.S := Message.S;
34 end;
36 end Iteration;
38 end Discr8;