* gcc-interface/utils2.c (gnat_stabilize_reference): Propagate
TREE_THIS_NOTRAP flag.
From-SVN: r174693
+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>:
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;
}