* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
[official-gcc.git] / gcc / testsuite / gnat.dg / default_variants.adb
blob2a8257e4aebebfc12ff95d65e3fba5c66a5710f9
1 -- { dg-do compile }
3 procedure Default_Variants is
5 type Variant_Kind is (A, B);
7 function Get_Default_Value (Kind : in Variant_Kind) return Natural is (10);
9 type Variant_Type (Kind : Variant_Kind := A) is
10 record
11 Common : Natural := Get_Default_Value (Kind);
12 case Kind is
13 when A =>
14 A_Value : Integer := Integer'First;
15 when B =>
16 B_Value : Natural := Natural'First;
17 end case;
18 end record;
20 type Containing_Type is tagged
21 record
22 Variant_Data : Variant_Type :=
23 (Kind => B, Common => <>, B_Value => 1);
24 end record;
26 begin
27 null;
28 end Default_Variants;