aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch8.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-04-21 11:12:45 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-04-21 11:12:45 +0200
commita1ad79ed6381825971cccac3c1bdc7dd4d3b11da (patch)
tree5740b1bdc11ed26549781264436b44125d326867 /gcc/ada/exp_ch8.adb
parente6007a27bdcfa46128c25db1471c2565392dba80 (diff)
downloadgcc-a1ad79ed6381825971cccac3c1bdc7dd4d3b11da.zip
gcc-a1ad79ed6381825971cccac3c1bdc7dd4d3b11da.tar.gz
gcc-a1ad79ed6381825971cccac3c1bdc7dd4d3b11da.tar.bz2
[multiple changes]
2016-04-21 Philippe Gil <gil@adacore.com> * krunch.adb (Krunch): Fix krunching of i-java. 2016-04-21 Arnaud Charlet <charlet@adacore.com> * exp_ch8.adb (Evaluation_Required): Always return True when Modify_Tree_For_C. From-SVN: r235320
Diffstat (limited to 'gcc/ada/exp_ch8.adb')
-rw-r--r--gcc/ada/exp_ch8.adb9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch8.adb b/gcc/ada/exp_ch8.adb
index dfd1796..9e06db2 100644
--- a/gcc/ada/exp_ch8.adb
+++ b/gcc/ada/exp_ch8.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -116,6 +116,8 @@ package body Exp_Ch8 is
-- interested in these operations if they occur as part of the name
-- itself, subscripts are just values that are computed as part of the
-- evaluation, so their form is unimportant.
+ -- In addition, always return True for Modify_Tree_For_C since the
+ -- code generator doesn't know how to handle renamings.
-------------------------
-- Evaluation_Required --
@@ -123,7 +125,10 @@ package body Exp_Ch8 is
function Evaluation_Required (Nam : Node_Id) return Boolean is
begin
- if Nkind_In (Nam, N_Indexed_Component, N_Slice) then
+ if Modify_Tree_For_C then
+ return True;
+
+ elsif Nkind_In (Nam, N_Indexed_Component, N_Slice) then
if Is_Packed (Etype (Prefix (Nam))) then
return True;
else