+2010-11-11 Jakub Jelinek <jakub@redhat.com>
+
+ Backport from mainline
+ 2010-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/46160
+ * cp-gimplify.c (cp_gimplify_expr): Drop volatile INDIRECT_REFs
+ on the RHS to avoid infinite recursion with gimplify_expr.
+
2010-10-15 Jason Merrill <jason@redhat.com>
PR c++/45983
if (!TREE_SIDE_EFFECTS (op1)
|| (DECL_P (op1) && TREE_THIS_VOLATILE (op1)))
*expr_p = op0;
+ else if (TREE_CODE (op1) == INDIRECT_REF
+ && TREE_THIS_VOLATILE (op1))
+ {
+ /* Similarly for volatile INDIRECT_REFs on the RHS. */
+ if (!TREE_SIDE_EFFECTS (TREE_OPERAND (op1, 0)))
+ *expr_p = op0;
+ else
+ *expr_p = build2 (COMPOUND_EXPR, TREE_TYPE (*expr_p),
+ TREE_OPERAND (op1, 0), op0);
+ }
else
*expr_p = build2 (COMPOUND_EXPR, TREE_TYPE (*expr_p),
op0, op1);
Backport from mainline
2010-11-05 Jakub Jelinek <jakub@redhat.com>
+ PR c++/46160
+ * g++.dg/opt/empty2.C: New test.
+
PR tree-optimization/46099
* gcc.dg/autopar/pr46099.c: New test.