aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2014-08-01 09:46:10 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 11:46:10 +0200
commit78433fec9a19c808d0b442741ad9ebb7b84389ef (patch)
tree2cbe9a751948983c270cd699ca60ecdf90ea2fb8 /gcc/ada
parent09c954dc79de82ab6220e151d032e3957a5a6008 (diff)
downloadgcc-78433fec9a19c808d0b442741ad9ebb7b84389ef.zip
gcc-78433fec9a19c808d0b442741ad9ebb7b84389ef.tar.gz
gcc-78433fec9a19c808d0b442741ad9ebb7b84389ef.tar.bz2
exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to previous state in CodePeer_Mode.
2014-08-01 Arnaud Charlet <charlet@adacore.com> * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to previous state in CodePeer_Mode. From-SVN: r213435
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/exp_attr.adb17
2 files changed, 19 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 69794aa..a9856c8 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-01 Arnaud Charlet <charlet@adacore.com>
+
+ * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
+ previous state in CodePeer_Mode.
+
2014-08-01 Robert Dewar <dewar@adacore.com>
* 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 fb715ea..d42018a 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;