+2018-11-14 Ed Schonberg <schonberg@adacore.com>
+
+ * freeze.adb (Freeze_Fixed_Point_Type): If the given low bound
+ of the type is less than the nearest model number, do not expand
+ the range of the type to include the model number below the
+ bound. Similar adjustment if the upper bound is larger than the
+ nearest model number.
+
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb (Install_Primitive_Elaboration_Check): Do not
Set_Realval (Lo, Loval);
end if;
- -- Compute the fudged bounds. If the number is a model number,
+ -- Compute the fudged bounds. If the bound is a model number,
+ -- (or greater if given low bound, smaller if high bound)
-- then we do nothing to include it, but we are allowed to backoff
-- to the next adjacent model number when we exclude it. If it is
-- not a model number then we straddle the two values with the
Model_Num := UR_Trunc (Loval / Small) * Small;
- if Loval = Model_Num then
+ if UR_Ge (Loval, Model_Num) then
Loval_Incl_EP := Model_Num;
else
Loval_Incl_EP := Model_Num - Small;
Model_Num := UR_Trunc (Hival / Small) * Small;
- if Hival = Model_Num then
+ if UR_Le (Hival, Model_Num) then
Hival_Incl_EP := Model_Num;
else
Hival_Incl_EP := Model_Num + Small;