PR tree-optimization/50767
* tree-ssa-pre.c (create_expression_by_pieces): Update the
folded statement.
* gcc.dg/torture/pr50767.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180134
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-10-18 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/50767
+ * tree-ssa-pre.c (create_expression_by_pieces): Update the
+ folded statement.
+
2011-10-18 Julian Brown <julian@codesourcery.com>
* config/arm/arm.c (arm_block_move_unaligned_straight)
2011-10-18 Julian Brown <julian@codesourcery.com>
* config/arm/arm.c (arm_block_move_unaligned_straight)
+2011-10-18 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/50767
+ * gcc.dg/torture/pr50767.c: New testcase.
+
2011-10-18 Julian Brown <julian@codesourcery.com>
* lib/target-supports.exp (check_effective_target_arm_unaligned): New.
2011-10-18 Julian Brown <julian@codesourcery.com>
* lib/target-supports.exp (check_effective_target_arm_unaligned): New.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fno-tree-copy-prop -fno-tree-dominator-opts" } */
+
+struct S
+{
+ struct S *s;
+};
+
+static struct S *ss;
+struct S *s;
+
+void bar(void);
+
+void foo(void)
+{
+ for (;;)
+ {
+ s->s = ss;
+ bar ();
+ }
+}
/* Fold the last statement. */
gsi = gsi_last (*stmts);
/* Fold the last statement. */
gsi = gsi_last (*stmts);
- fold_stmt_inplace (&gsi);
+ if (fold_stmt_inplace (&gsi))
+ update_stmt (gsi_stmt (gsi));
/* Add a value number to the temporary.
The value may already exist in either NEW_SETS, or AVAIL_OUT, because
/* Add a value number to the temporary.
The value may already exist in either NEW_SETS, or AVAIL_OUT, because