|
| 1 | +procedure Main is |
| 2 | + function Id (B : Boolean) return Boolean is (B); |
| 3 | + function Id (I : Integer) return Integer is (I); |
| 4 | + |
| 5 | + type Rec (D : Boolean) is null record; |
| 6 | + subtype Stat_Const_Rec is Rec (True); |
| 7 | + subtype Dyn_Const_Rec is Rec (Id (True)); |
| 8 | + |
| 9 | + type Arr is array (Integer range <>) of Integer; |
| 10 | + subtype Stat_Const_Arr is Arr (1 .. 3); |
| 11 | + subtype Dyn_Const_Arr is Arr (1 .. Id (3)); |
| 12 | + |
| 13 | + subtype Stat_Int is Integer range 1 .. 3; |
| 14 | + subtype Dyn_Int is Integer range Id (1) .. Id (3); |
| 15 | + |
| 16 | + subtype Stat_Pred_Int is Integer |
| 17 | + with Static_Predicate => Stat_Pred_Int in 1 .. 5; |
| 18 | + subtype Dyn_Pred_Int is Integer |
| 19 | + with Dynamic_Predicate => Dyn_Pred_Int < 50; |
| 20 | + |
| 21 | + S : String := "Hello"; |
| 22 | + C_S : constant String := "world"; |
| 23 | + |
| 24 | + procedure Process_Int (I : Integer) is |
| 25 | + begin |
| 26 | + null; |
| 27 | + end Process_Int; |
| 28 | + |
| 29 | + procedure Process_Stat_Int (I : Stat_Int) is |
| 30 | + begin |
| 31 | + null; |
| 32 | + end Process_Stat_Int; |
| 33 | + |
| 34 | + procedure Process_Dyn_Int (I : Dyn_Int) is |
| 35 | + begin |
| 36 | + null; |
| 37 | + end Process_Dyn_Int; |
| 38 | + |
| 39 | + procedure Process_Stat_Pred_Int (I : Stat_Pred_Int) is |
| 40 | + begin |
| 41 | + null; |
| 42 | + end Process_Stat_Pred_Int; |
| 43 | + |
| 44 | + procedure Process_Dyn_Pred_Int (I : Dyn_Pred_Int) is |
| 45 | + begin |
| 46 | + null; |
| 47 | + end Process_Dyn_Pred_Int; |
| 48 | + |
| 49 | + procedure Process_Multiple (I : Dyn_Pred_Int; J : Stat_Pred_Int) is |
| 50 | + begin |
| 51 | + null; |
| 52 | + end Process_Multiple; |
| 53 | +begin |
| 54 | + Process_Int (S'Length); -- NOFLAG |
| 55 | + Process_Int (S'Size); -- NOFLAG |
| 56 | + Process_Int (C_S'Length); -- NOFLAG |
| 57 | + Process_Int (C_S'Size); -- NOFLAG |
| 58 | + Process_Stat_Int (S'Length); -- NOFLAG |
| 59 | + Process_Stat_Int (S'Size); -- NOFLAG |
| 60 | + Process_Stat_Int (C_S'Length); -- NOFLAG |
| 61 | + Process_Stat_Int (C_S'Size); -- NOFLAG |
| 62 | + Process_Dyn_Int (S'Length); -- NOFLAG |
| 63 | + Process_Dyn_Int (S'Size); -- NOFLAG |
| 64 | + Process_Dyn_Int (C_S'Length); -- FLAG |
| 65 | + Process_Dyn_Int (C_S'Size); -- NOFLAG |
| 66 | + Process_Stat_Pred_Int (S'Length); -- NOFLAG |
| 67 | + Process_Stat_Pred_Int (S'Size); -- NOFLAG |
| 68 | + Process_Stat_Pred_Int (C_S'Length); -- NOFLAG |
| 69 | + Process_Stat_Pred_Int (C_S'Size); -- NOFLAG |
| 70 | + Process_Dyn_Pred_Int (S'Length); -- NOFLAG |
| 71 | + Process_Dyn_Pred_Int (S'Size); -- NOFLAG |
| 72 | + Process_Dyn_Pred_Int (C_S'Length); -- FLAG |
| 73 | + Process_Dyn_Pred_Int (C_S'Size); -- NOFLAG |
| 74 | + |
| 75 | + Process_Multiple (S'Length, S'Size); -- NOFLAG |
| 76 | + Process_Multiple (C_S'Length, C_S'Size); -- FLAG |
| 77 | +end Main; |
0 commit comments