|
| 1 | +procedure Main is |
| 2 | + type R_1 (B : Boolean := False) is limited record |
| 3 | + case B is |
| 4 | + when True => |
| 5 | + I : Integer; |
| 6 | + when others => |
| 7 | + F : Float; |
| 8 | + end case; |
| 9 | + end record; |
| 10 | + subtype S_R_1 is R_1; |
| 11 | + type D_R_1 is new R_1; |
| 12 | + type L_D_R_1 is limited new R_1; |
| 13 | + |
| 14 | + type Int_Arr is array (Integer range <>) of Integer; |
| 15 | + type R_2 (I : Integer := 2) is limited record |
| 16 | + A : Int_Arr (1 .. I); |
| 17 | + end record; |
| 18 | + type R_3 (I : Integer) is limited record |
| 19 | + A : Int_Arr (1 .. I); |
| 20 | + end record; |
| 21 | + type R_4 (I : Integer := 2) is record |
| 22 | + A : Int_Arr (1 .. I); |
| 23 | + end record; |
| 24 | + |
| 25 | + type R_5 (I : Integer := 2) is limited record |
| 26 | + A : Int_Arr (1 .. 4); |
| 27 | + end record; |
| 28 | + |
| 29 | + type R_6 is tagged limited record |
| 30 | + B : Boolean; |
| 31 | + end record; |
| 32 | + type D_R_6 (I : Integer := 2) is new R_6 with record |
| 33 | + A : Int_Arr (1 .. I); |
| 34 | + end record; |
| 35 | + subtype S_D_R_6 is D_R_6; |
| 36 | + |
| 37 | + function Get_R_1 return R_1 is |
| 38 | + (B => True, I => 0); |
| 39 | + function Get_S_R_1 return S_R_1 is |
| 40 | + (B => True, I => 0); |
| 41 | + function Get_D_R_1 return D_R_1 is |
| 42 | + (B => True, I => 0); |
| 43 | + function Get_L_D_R_1 return L_D_R_1 is |
| 44 | + (B => True, I => 0); |
| 45 | + function Get_R_2 return R_2 is |
| 46 | + (I => 4, A => (others => 0)); |
| 47 | + function Get_R_3 return R_3 is |
| 48 | + (I => 4, A => (others => 0)); |
| 49 | + function Get_R_4 return R_4 is |
| 50 | + (I => 4, A => (others => 0)); |
| 51 | + function Get_R_5 return R_5 is |
| 52 | + (I => 4, A => (others => 0)); |
| 53 | + function Get_D_R_6 return D_R_6 is |
| 54 | + (B => False, I => 4, A => (others => 0)); |
| 55 | + function Get_S_D_R_6 return S_D_R_6 is |
| 56 | + (B => False, I => 4, A => (others => 0)); |
| 57 | + |
| 58 | + procedure Consume_R_1 (R : R_1) is null; |
| 59 | + procedure Consume_S_R_1 (R : S_R_1) is null; |
| 60 | + procedure Consume_D_R_1 (R : D_R_1) is null; |
| 61 | + procedure Consume_L_D_R_1 (R : L_D_R_1) is null; |
| 62 | + procedure Consume_R_2 (R : R_2) is null; |
| 63 | + procedure Consume_R_3 (R : R_3) is null; |
| 64 | + procedure Consume_R_4 (R : R_4) is null; |
| 65 | + procedure Consume_R_5 (R : R_5) is null; |
| 66 | + procedure Consume_D_R_6 (R : D_R_6) is null; |
| 67 | + procedure Consume_S_D_R_6 (R : S_D_R_6) is null; |
| 68 | +begin |
| 69 | + Consume_R_1 (Get_R_1); -- FLAG |
| 70 | + Consume_S_R_1 (Get_S_R_1); -- FLAG |
| 71 | + Consume_D_R_1 (Get_D_R_1); -- FLAG |
| 72 | + Consume_L_D_R_1 (Get_L_D_R_1); -- FLAG |
| 73 | + Consume_R_2 (Get_R_2); -- FLAG |
| 74 | + Consume_R_3 (Get_R_3); -- NOFLAG |
| 75 | + Consume_R_4 (Get_R_4); -- NOFLAG |
| 76 | + Consume_R_5 (Get_R_5); -- NOFLAG |
| 77 | + Consume_D_R_6 (Get_D_R_6); -- FLAG |
| 78 | + Consume_S_D_R_6 (Get_S_D_R_6); -- FLAG |
| 79 | +end Main; |
0 commit comments