OSDN Git Service

* gcc-interface/utils2.c (gnat_stabilize_reference): Propagate
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Jun 2011 10:37:13 +0000 (10:37 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Jun 2011 10:37:13 +0000 (10:37 +0000)
TREE_THIS_NOTRAP flag.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174693 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/utils2.c

index ac77086..a54c336 100644 (file)
@@ -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.
 
index 2a455d1..44eb5cb 100644 (file)
@@ -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;
 }