gcc/cp
[official-gcc.git] / gcc / testsuite / gnat.dg / discr14.ads
bloba6b5a0a87c26d4367c3265fc195d6b04b76bdaa0
1 package Discr14 is
3 type COMPLETION_CODE is (SUCCESS, FAILURE, NONE);
5 type T_SW_TYPE is (NONE, COMPLETION_CODE_TYPE);
7 type T_COMPLETION_CODE_RANGE (CONSTRAINED: BOOLEAN := FALSE) is
8 record
9 case CONSTRAINED is
10 when TRUE =>
11 FIRST : COMPLETION_CODE := SUCCESS;
12 LAST : COMPLETION_CODE := FAILURE;
13 when FALSE =>
14 null;
15 end case;
16 end record;
18 type T_SW_DIMENSIONS is range 0 .. 3;
20 type T_SW_INDEX_LIST is array (T_SW_DIMENSIONS range <>) of POSITIVE;
22 type T_SW_TYPE_DESCRIPTOR (SW_TYPE : T_SW_TYPE := NONE;
23 DIMENSION : T_SW_DIMENSIONS := 0) is
24 record
25 BOUNDS : T_SW_INDEX_LIST (1 .. DIMENSION);
27 case SW_TYPE is
29 when COMPLETION_CODE_TYPE =>
30 COMPLETION_CODE_RANGE : T_COMPLETION_CODE_RANGE;
32 when OTHERS =>
33 null;
35 end case;
36 end record;
38 type SW_TYPE_INFO is access T_SW_TYPE_DESCRIPTOR;
40 procedure ASSIGN(TARGET : in out SW_TYPE_INFO; SOURCE : in SW_TYPE_INFO) ;
42 end Discr14;