diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-11 10:07:06 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-11 10:07:06 +0000 |
commit | 51c733e0f6b4311d6dedf8a494d6fb79a2dd8198 (patch) | |
tree | ea3db1ae3135a8af79bd7e6657e739ecfc21ef62 /gcc/ada/exp_util.adb | |
parent | f422e2c4eaca1f04cbb42400da57ff223b0091ab (diff) | |
download | gcc-51c733e0f6b4311d6dedf8a494d6fb79a2dd8198.tar.gz |
2010-10-11 Arnaud Charlet <charlet@adacore.com>
* sem_ch3.adb, exp_ch6.adb
(Make_Build_In_Place_Call_In_Anonymous_Context,
Make_Build_In_Place_Call_In_Assignment,
Make_Build_In_Place_Call_In_Object_Declaration): Fix calls to
Add_Task_Actuals_To_Build_In_Place_Call in case of No_Task_Hierarchy
restriction.
(Access_Definition): Add missing handling of No_Task_Hierarchy.
2010-10-11 Javier Miranda <miranda@adacore.com>
* exp_util.adb (Remove_Side_Effects): No action needed for renamings of
class-wide expressions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165293 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_util.adb')
-rw-r--r-- | gcc/ada/exp_util.adb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index fc2bb694445..980f0f6e80b 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -4839,6 +4839,17 @@ package body Exp_Util is return; end if; + -- No action needed for renamings of class-wide expressions because for + -- class-wide types Remove_Side_Effects uses a renaming to capture the + -- expression (and hence we would generate a never-ending loop in the + -- frontend). + + if Is_Class_Wide_Type (Exp_Type) + and then Nkind (Parent (Exp)) = N_Object_Renaming_Declaration + then + return; + end if; + -- All this must not have any checks Scope_Suppress := (others => True); |