diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-06-06 10:37:13 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-06-06 10:37:13 +0000 |
commit | 3bfc61cf25241bdcf7aad08c1e2b6607d25f97bb (patch) | |
tree | a1ff18afcaf5b48897b2d483eeac0acc5b183e11 /gcc | |
parent | a864a70be43edc3ac8ec5f8449e096c2f81e29a0 (diff) | |
download | gcc-3bfc61cf25241bdcf7aad08c1e2b6607d25f97bb.zip gcc-3bfc61cf25241bdcf7aad08c1e2b6607d25f97bb.tar.gz gcc-3bfc61cf25241bdcf7aad08c1e2b6607d25f97bb.tar.bz2 |
utils2.c (gnat_stabilize_reference): Propagate TREE_THIS_NOTRAP flag.
* gcc-interface/utils2.c (gnat_stabilize_reference): Propagate
TREE_THIS_NOTRAP flag.
From-SVN: r174693
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ac77086..a54c336 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2011-06-06 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate + TREE_THIS_NOTRAP flag. + +2011-06-06 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>: Fix thinko. diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 2a455d1..44eb5cb 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -2570,5 +2570,8 @@ gnat_stabilize_reference (tree ref, bool force, bool *success) TREE_SIDE_EFFECTS (result) |= TREE_SIDE_EFFECTS (ref); TREE_THIS_VOLATILE (result) = TREE_THIS_VOLATILE (ref); + if (code == INDIRECT_REF || code == ARRAY_REF || code == ARRAY_RANGE_REF) + TREE_THIS_NOTRAP (result) = TREE_THIS_NOTRAP (ref); + return result; } |