PR tree-optimization/44937
PR tree-optimization/45412
* ipa-split.c (split_function): Properly remove PHI nodes.
* g++.dg/opt/pr45412.C: New testcase.
* gcc.c-torture/compile/pr45412.c: Likewise.
* gcc.c-torture/compile/pr44937.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163775
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-09-02 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/44937
+ PR tree-optimization/45412
+ * ipa-split.c (split_function): Properly remove PHI nodes.
+
2010-09-02 Joseph Myers <joseph@codesourcery.com>
* opts.h (struct cl_option): Add warn_message field.
{
gimple stmt = gsi_stmt (gsi);
gcc_assert (!is_gimple_reg (gimple_phi_result (stmt)));
- mark_sym_for_renaming (SSA_NAME_VAR (PHI_RESULT (stmt)));
- gsi_remove (&gsi, false);
+ mark_virtual_phi_result_for_renaming (stmt);
+ remove_phi_node (&gsi, true);
}
}
/* When we pass aorund the value, use existing return block. */
+2010-09-02 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/44937
+ PR tree-optimization/45412
+ * g++.dg/opt/pr45412.C: New testcase.
+ * gcc.c-torture/compile/pr45412.c: Likewise.
+ * gcc.c-torture/compile/pr44937.c: Likewise.
+
2010-09-02 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/cpp/warn-comments-3.c: New. Based on warn-comments-2.c
--- /dev/null
+// { dg-do compile }
+// { dg-options "-O2 -fipa-cp-clone -ftracer" }
+
+int foo (int *);
+void bar ();
+
+struct S
+{
+ virtual int vm ();
+ ~S ();
+};
+
+int
+S::vm ()
+{
+ int state;
+ switch (foo (&state))
+ {
+ case 0:
+ bar ();
+ case 1:
+ delete this;
+ }
+ return state;
+}
+
--- /dev/null
+int g_19;
+int *g_42;
+int **volatile g = &g_42;
+int g_67[5][9][2][1] = {
+};
+
+int
+func_4 (int p_5, unsigned char p_6, unsigned char p_7)
+{
+ unsigned char l_8[1];
+ if (p_6)
+ goto lbl_13;
+ for (p_6 = 0; p_6; p_6 = (p_6, 0))
+ if (0)
+ {
+ }
+ else
+ lbl_13:for (p_6 = 0; p_6 < 1; p_6 += 1)
+ l_8[p_6] = 0;
+ return 0;
+}
+
+int *
+func_45 (unsigned long p_46, unsigned char p_47)
+{
+ int *l_56 = &g_19;
+ (void *)&l_56 != (void *)&g | !1 == func_4 (0, g_67[2][6][1][0], 0) ^ func_4 (1, 0, 0);
+ return 0;
+}
+
--- /dev/null
+extern void baz (int, int, int);
+
+int j;
+
+int
+bar (void)
+{
+ int n = 0, *np = &n;
+ if (j)
+ baz (0, 0, 0);
+ if (j)
+ baz (0, 0, 0);
+ return n;
+}
+
+void
+foo (void)
+{
+ bar ();
+ bar ();
+}
+