[Ada] Avoid creating temporaries in Universal_Integer for range checks
2020-06-03 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* checks.adb (Is_Single_Attribute_Reference): New predicate.
(Generate_Range_Check): Do not force the evaluation if the
node is a single attribute reference.
* exp_util.adb (Side_Effect_Free_Attribute): New predicate.
(Side_Effect_Free) <N_Attribute_Reference>: Call it.
(Remove_Side_Effects): Remove the side effects of the prefix
for an attribute reference whose prefix is not a name.