From: Arnaud Charlet Date: Fri, 1 Aug 2014 09:46:10 +0000 (+0000) Subject: exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to previous state in CodePe... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78433fec9a19c808d0b442741ad9ebb7b84389ef;p=gcc.git exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to previous state in CodePeer_Mode. 2014-08-01 Arnaud Charlet * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to previous state in CodePeer_Mode. From-SVN: r213435 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 69794aa4006..a9856c83896 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2014-08-01 Arnaud Charlet + + * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to + previous state in CodePeer_Mode. + 2014-08-01 Robert Dewar * hostparm.ads: Put back definition of OpenVMS as False to aid diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index fb715ea6d21..d42018a55b9 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -7955,8 +7955,16 @@ package body Exp_Attr is Id : constant Attribute_Id := Get_Attribute_Id (Attribute_Name (N)); begin + -- Machine and Model can be expanded by the backend, but in CodePeer + -- mode, we prefer the front end to do the expansion, because CodePeer + -- is not prepared to handle these attributes. + if Id = Attribute_Machine or else Id = Attribute_Model then - return True; + return not CodePeer_Mode; + + -- Remaining cases handled by the back end are Rounding and Truncatation + -- when appearing as the operand of a conversion to some integer type. + -- CodePeer can handle these cases fine. elsif Nkind (Parent (N)) /= N_Type_Conversion or else not Is_Integer_Type (Etype (Parent (N))) @@ -7964,8 +7972,11 @@ package body Exp_Attr is return False; end if; - -- Should also support 'Machine_Rounding and 'Unbiased_Rounding, but - -- required back end support has not been implemented yet ??? + -- Here we are in the integer conversion context + + -- 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; end Is_Inline_Floating_Point_Attribute;