+2012-07-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53849
+ * tree-cfg.c (move_stmt_op): Only call add_referenced_var
+ for duplicated locals. Use add_referenced_var_1 to avoid
+ pushing/popping cfun.
+
2012-07-04 Kai Tietz <ktietz@redhat.com>
* config/i386/winnt.c (i386_pe_reloc_rw_mask): New function.
+2012-07-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53849
+ * gcc.dg/pr53849.c: New testcase.
+
2012-07-03 Jakub Jelinek <jakub@redhat.com>
PR c++/53812
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fno-tree-loop-im" } */
+
+extern int *b, *e[8], d;
+
+void
+foo (void)
+{
+ int i;
+ for (i = 0; i < 8; ++i)
+ while (--d)
+ e[i] = 0;
+}
if ((TREE_CODE (t) == VAR_DECL
&& !is_global_var (t))
|| TREE_CODE (t) == CONST_DECL)
- replace_by_duplicate_decl (tp, p->vars_map, p->to_context);
-
- if (SSA_VAR_P (t)
- && gimple_in_ssa_p (cfun))
{
- push_cfun (DECL_STRUCT_FUNCTION (p->to_context));
- add_referenced_var (*tp);
- pop_cfun ();
+ struct function *to_fn = DECL_STRUCT_FUNCTION (p->to_context);
+ replace_by_duplicate_decl (tp, p->vars_map, p->to_context);
+ if (gimple_referenced_vars (to_fn))
+ add_referenced_var_1 (*tp, to_fn);
}
}
*walk_subtrees = 0;