Commit 4cb3570c by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/88071 (ICE: verify_gimple failed (error: dead STMT in EH table))

	PR tree-optimization/88071
	* tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
	of false as last argument to gsi_remove.
	* tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
	false as last argument to gsi_replace.

	* gcc.dg/pr88071.c: New test.

From-SVN: r266276
parent 3b60ab0a
2018-11-19 Jakub Jelinek <jakub@redhat.com> 2018-11-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88071
* tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
of false as last argument to gsi_remove.
* tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
false as last argument to gsi_replace.
PR debug/87039 PR debug/87039
* omp-expand.c: Don't include debug.h. * omp-expand.c: Don't include debug.h.
(adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
2018-11-19 Jakub Jelinek <jakub@redhat.com> 2018-11-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88071
* gcc.dg/pr88071.c: New test.
PR c++/60994 PR c++/60994
* g++.dg/lookup/pr60994.C: New test. * g++.dg/lookup/pr60994.C: New test.
......
/* PR tree-optimization/88071 */
/* { dg-do compile } */
/* { dg-options "-O2 -fexceptions -fnon-call-exceptions -fopenmp-simd -ftrapv -ftree-loop-vectorize" } */
#include "gomp/openmp-simd-2.c"
...@@ -5861,7 +5861,7 @@ vectorize_fold_left_reduction (stmt_vec_info stmt_info, ...@@ -5861,7 +5861,7 @@ vectorize_fold_left_reduction (stmt_vec_info stmt_info,
/* Remove the statement, so that we can use the same code paths /* Remove the statement, so that we can use the same code paths
as for statements that we've just created. */ as for statements that we've just created. */
gimple_stmt_iterator tmp_gsi = gsi_for_stmt (new_stmt); gimple_stmt_iterator tmp_gsi = gsi_for_stmt (new_stmt);
gsi_remove (&tmp_gsi, false); gsi_remove (&tmp_gsi, true);
} }
if (i == vec_num - 1) if (i == vec_num - 1)
......
...@@ -1720,7 +1720,7 @@ vect_finish_replace_stmt (stmt_vec_info stmt_info, gimple *vec_stmt) ...@@ -1720,7 +1720,7 @@ vect_finish_replace_stmt (stmt_vec_info stmt_info, gimple *vec_stmt)
gcc_assert (gimple_get_lhs (stmt_info->stmt) == gimple_get_lhs (vec_stmt)); gcc_assert (gimple_get_lhs (stmt_info->stmt) == gimple_get_lhs (vec_stmt));
gimple_stmt_iterator gsi = gsi_for_stmt (stmt_info->stmt); gimple_stmt_iterator gsi = gsi_for_stmt (stmt_info->stmt);
gsi_replace (&gsi, vec_stmt, false); gsi_replace (&gsi, vec_stmt, true);
return vect_finish_stmt_generation_1 (stmt_info, vec_stmt); return vect_finish_stmt_generation_1 (stmt_info, vec_stmt);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment