aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-09-15 12:37:19 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-09-15 12:37:19 +0000
commitf6b4dc28f9743779b846ca04a4f97d293c8fd6fa (patch)
treed53f8f116760f611f055d13dc71ab30e89b5b222
parent6ec0e5b9c323dbbdfafb49d2c946be8f43237214 (diff)
downloadgcc-f6b4dc28f9743779b846ca04a4f97d293c8fd6fa.zip
gcc-f6b4dc28f9743779b846ca04a4f97d293c8fd6fa.tar.gz
gcc-f6b4dc28f9743779b846ca04a4f97d293c8fd6fa.tar.bz2
re PR middle-end/67563 (verify_flow_info failed)
2015-09-15 Richard Biener <rguenther@suse.de> PR middle-end/67563 * gimple-fold.c (gimplify_and_update_call_from_tree): Do not transfer EH info from old to new stmt. (replace_call_with_value): Likewise. (replace_call_with_call_and_fold): Likewise. (gimple_fold_builtin_memory_op): Likewise. (gimple_fold_builtin_memset): Likewise. (gimple_fold_builtin_stpcpy): Likewise. (gimple_fold_call): Likewise. * gcc.dg/pr67563.c: New testcase. From-SVN: r227788
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/gimple-fold.c22
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr67563.c11
4 files changed, 39 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d4db5af..ea2ebd0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2015-09-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/67563
+ * gimple-fold.c (gimplify_and_update_call_from_tree): Do not
+ transfer EH info from old to new stmt.
+ (replace_call_with_value): Likewise.
+ (replace_call_with_call_and_fold): Likewise.
+ (gimple_fold_builtin_memory_op): Likewise.
+ (gimple_fold_builtin_memset): Likewise.
+ (gimple_fold_builtin_stpcpy): Likewise.
+ (gimple_fold_call): Likewise.
+
2015-09-15 Alan Lawrence <alan.lawrence@arm.com>
* config/aarch64/aarch64.c (aarch64_simd_attr_length_rglist): Update
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index c79f9b3..ac9f46c 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -548,7 +548,7 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
unlink_stmt_vdef (stmt);
release_defs (stmt);
}
- gsi_replace (si_p, gimple_build_nop (), true);
+ gsi_replace (si_p, gimple_build_nop (), false);
return;
}
}
@@ -589,7 +589,7 @@ replace_call_with_value (gimple_stmt_iterator *gsi, tree val)
unlink_stmt_vdef (stmt);
release_ssa_name (vdef);
}
- gsi_replace (gsi, repl, true);
+ gsi_replace (gsi, repl, false);
}
/* Replace the call at *GSI with the new call REPL and fold that
@@ -608,7 +608,7 @@ replace_call_with_call_and_fold (gimple_stmt_iterator *gsi, gimple repl)
gimple_set_vuse (repl, gimple_vuse (stmt));
SSA_NAME_DEF_STMT (gimple_vdef (repl)) = repl;
}
- gsi_replace (gsi, repl, true);
+ gsi_replace (gsi, repl, false);
fold_stmt (gsi);
}
@@ -655,7 +655,7 @@ gimple_fold_builtin_memory_op (gimple_stmt_iterator *gsi,
unlink_stmt_vdef (stmt);
release_ssa_name (vdef);
}
- gsi_replace (gsi, repl, true);
+ gsi_replace (gsi, repl, false);
return true;
}
@@ -668,7 +668,7 @@ gimple_fold_builtin_memory_op (gimple_stmt_iterator *gsi,
release_ssa_name (gimple_vdef (stmt));
if (!lhs)
{
- gsi_replace (gsi, gimple_build_nop (), true);
+ gsi_replace (gsi, gimple_build_nop (), false);
return true;
}
goto done;
@@ -750,7 +750,7 @@ gimple_fold_builtin_memory_op (gimple_stmt_iterator *gsi,
SSA_NAME_DEF_STMT (gimple_vdef (new_stmt)) = new_stmt;
if (!lhs)
{
- gsi_replace (gsi, new_stmt, true);
+ gsi_replace (gsi, new_stmt, false);
return true;
}
gsi_insert_before (gsi, new_stmt, GSI_SAME_STMT);
@@ -1030,7 +1030,7 @@ gimple_fold_builtin_memory_op (gimple_stmt_iterator *gsi,
SSA_NAME_DEF_STMT (gimple_vdef (new_stmt)) = new_stmt;
if (!lhs)
{
- gsi_replace (gsi, new_stmt, true);
+ gsi_replace (gsi, new_stmt, false);
return true;
}
gsi_insert_before (gsi, new_stmt, GSI_SAME_STMT);
@@ -1048,7 +1048,7 @@ done:
dest = force_gimple_operand_gsi (gsi, dest, false, NULL_TREE, true,
GSI_SAME_STMT);
gimple repl = gimple_build_assign (lhs, dest);
- gsi_replace (gsi, repl, true);
+ gsi_replace (gsi, repl, false);
return true;
}
@@ -1130,7 +1130,7 @@ gimple_fold_builtin_memset (gimple_stmt_iterator *gsi, tree c, tree len)
if (gimple_call_lhs (stmt))
{
gimple asgn = gimple_build_assign (gimple_call_lhs (stmt), dest);
- gsi_replace (gsi, asgn, true);
+ gsi_replace (gsi, asgn, false);
}
else
{
@@ -1980,7 +1980,7 @@ gimple_fold_builtin_stpcpy (gimple_stmt_iterator *gsi)
gsi_insert_seq_before (gsi, stmts, GSI_SAME_STMT);
gassign *ret = gimple_build_assign (gimple_call_lhs (stmt),
POINTER_PLUS_EXPR, dest, tem);
- gsi_replace (gsi, ret, true);
+ gsi_replace (gsi, ret, false);
/* Finally fold the memcpy call. */
gimple_stmt_iterator gsi2 = *gsi;
gsi_prev (&gsi2);
@@ -3062,7 +3062,7 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace)
&& tree_int_cst_le (gimple_call_arg (stmt, 1),
gimple_call_arg (stmt, 2))))
{
- gsi_replace (gsi, gimple_build_nop (), true);
+ gsi_replace (gsi, gimple_build_nop (), false);
unlink_stmt_vdef (stmt);
release_defs (stmt);
return true;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 69722d0..2355856 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/67563
+ * gcc.dg/pr67563.c: New testcase.
+
2015-09-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/67460
diff --git a/gcc/testsuite/gcc.dg/pr67563.c b/gcc/testsuite/gcc.dg/pr67563.c
new file mode 100644
index 0000000..34a78a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr67563.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fexceptions" } */
+
+static void
+emit_package (int p1)
+{
+ int a;
+ int b[0];
+ a = __fprintf_chk (0, 0, "");
+}
+void emit_lua () { emit_package (0); }