From 3bfc61cf25241bdcf7aad08c1e2b6607d25f97bb Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 6 Jun 2011 10:37:13 +0000 Subject: 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 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/utils2.c | 3 +++ 2 files changed, 8 insertions(+) (limited to 'gcc/ada') 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 + * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate + TREE_THIS_NOTRAP flag. + +2011-06-06 Eric Botcazou + * gcc-interface/utils2.c (gnat_stabilize_reference) : 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; } -- cgit v1.1