[Ada] Implement Machine_Rounding attribute in line when possible
GNAT implements Machine_Rounding as an alias for Rounding but, whereas the implementation of the latter is in line when possible, that of the former is always out of line, which is not aligned with the intent of the Ada RM. This changes the compiler to using for Machine_Rounding the same in line implementation as Rounding when possible. Running these commands: gcc -c f.adb -gnatD grep system f.adb.dg On the following sources: function F (Val : Float) return Integer is begin return Integer (Float'Machine_Rounding (Val)); end; Should execute silently. 2019-09-19 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Treat Machine_Rounding as an alias for Rounding. * sem_res.adb (Simplify_Type_Conversion): Likewise. From-SVN: r275943
Showing
Please
register
or
sign in
to comment