+2006-06-13 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/27830
+ * tree-inline.c (copy_body_r): For copying the operand
+ of an ADDR_EXPR make sure to fold &* afterwards.
+
2006-06-12 Eric Botcazou <ebotcazou@adacore.com>
* gimplify.c (gimplify_expr): Treat VIEW_CONVERT_EXPR like other
+2006-06-13 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/27830
+ * g++.dg/tree-ssa/pr27830.C: New testcase.
+
2006-06-13 Matthew Sachs <msachs@apple.com>
* lib/target-supports-dg.exp (check-flags): Include TOOL_OPTIONS in
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+struct gc{};
+struct transform:public gc
+{
+ double x, y, z, t;
+ transform (void){}
+};
+inline transform f (void)
+{
+ return transform ();
+};
+void transformed (void)
+{
+ new transform (f());
+}
+
else if (TREE_CODE (*tp) == ADDR_EXPR)
{
walk_tree (&TREE_OPERAND (*tp, 0), copy_body_r, id, NULL);
- recompute_tree_invariant_for_addr_expr (*tp);
+ /* Handle the case where we substituted an INDIRECT_REF
+ into the operand of the ADDR_EXPR. */
+ if (TREE_CODE (TREE_OPERAND (*tp, 0)) == INDIRECT_REF)
+ *tp = TREE_OPERAND (TREE_OPERAND (*tp, 0), 0);
+ else
+ recompute_tree_invariant_for_addr_expr (*tp);
*walk_subtrees = 0;
}
}