+2019-09-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Treat
+ Machine_Rounding as an alias for Rounding.
+ * sem_res.adb (Simplify_Type_Conversion): Likewise.
+
2019-09-19 Gary Dismukes <dismukes@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Bypass the transformation of
return False;
end if;
- -- Here we are in the integer conversion context
+ -- Here we are in the integer conversion context. We reuse Rounding for
+ -- Machine_Rounding as System.Fat_Gen, which is a permissible behavior.
- -- Very probably we should also recognize the cases of Machine_Rounding
- -- and unbiased rounding in this conversion context, but the back end is
- -- not yet prepared to handle these cases ???
-
- return Id = Attribute_Rounding or else Id = Attribute_Truncation;
+ return
+ Id = Attribute_Rounding
+ or else Id = Attribute_Machine_Rounding
+ or else Id = Attribute_Truncation;
end Is_Inline_Floating_Point_Attribute;
end Exp_Attr;
-- ityp (x)
-- with the Float_Truncate flag set to False or True respectively,
- -- which is more efficient.
+ -- which is more efficient. We reuse Rounding for Machine_Rounding
+ -- as System.Fat_Gen, which is a permissible behavior.
if Is_Floating_Point_Type (Opnd_Typ)
and then
and then Conversion_OK (N)))
and then Nkind (Operand) = N_Attribute_Reference
and then Nam_In (Attribute_Name (Operand), Name_Rounding,
+ Name_Machine_Rounding,
Name_Truncation)
then
declare