diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-07-16 14:12:13 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-07-16 14:12:13 +0000 |
commit | afe9c53918d14a5ef8807ea4284512dd94e4c15d (patch) | |
tree | 68e9262e2bd4131165245008976986e2eb5dab70 | |
parent | 4dd2ed1495378681b58c2e7ff5c1cc5511882a2d (diff) | |
download | gcc-afe9c53918d14a5ef8807ea4284512dd94e4c15d.zip gcc-afe9c53918d14a5ef8807ea4284512dd94e4c15d.tar.gz gcc-afe9c53918d14a5ef8807ea4284512dd94e4c15d.tar.bz2 |
[Ada] Deep copy operands of membership operations for unnesting
2018-07-16 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* exp_ch4.adb (Expand_Set_Membership): Use New_Copy_Tree to perform a
deep copy of the left operand when building each conjuct of the
expanded membership operation, to avoid sharing nodes between them.
This sharing interferes with the unnesting machinery and is generally
undesirable.
From-SVN: r262727
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8b79b00..22fc57b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,13 @@ 2018-07-16 Ed Schonberg <schonberg@adacore.com> + * exp_ch4.adb (Expand_Set_Membership): Use New_Copy_Tree to perform a + deep copy of the left operand when building each conjuct of the + expanded membership operation, to avoid sharing nodes between them. + This sharing interferes with the unnesting machinery and is generally + undesirable. + +2018-07-16 Ed Schonberg <schonberg@adacore.com> + * exp_unst.adb (Visit_Node): Handle 'Address references that are calls. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index a98ffb3..8dad953 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -12248,7 +12248,7 @@ package body Exp_Ch4 is function Make_Cond (Alt : Node_Id) return Node_Id is Cond : Node_Id; - L : constant Node_Id := New_Copy (Lop); + L : constant Node_Id := New_Copy_Tree (Lop); R : constant Node_Id := Relocate_Node (Alt); begin |