diff options
Diffstat (limited to 'gcc/ada')
-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; } |