Commit ad885386 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/50133 (ICE: SIGSEGV in vect_finish_stmt_generation…

re PR tree-optimization/50133 (ICE: SIGSEGV in vect_finish_stmt_generation (gimple.h:4821) with -ftree-vectorize -fno-tree-loop-im)

	PR tree-optimization/50133
	* tree-vect-stmts.c (vect_finish_stmt_generation): Copy location
	from stmt instead of some statement around gsi.

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

From-SVN: r177958
parent e4269c78
2011-08-22 Jakub Jelinek <jakub@redhat.com> 2011-08-22 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/50133
* tree-vect-stmts.c (vect_finish_stmt_generation): Copy location
from stmt instead of some statement around gsi.
PR middle-end/50141 PR middle-end/50141
* expr.c (get_bit_range): Only use DECL_THREAD_LOCAL_P if * expr.c (get_bit_range): Only use DECL_THREAD_LOCAL_P if
innerdecl is a VAR_DECL. innerdecl is a VAR_DECL.
......
2011-08-22 Jakub Jelinek <jakub@redhat.com> 2011-08-22 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/50133
* gcc.dg/pr50133.c: New test.
PR middle-end/50141 PR middle-end/50141
* c-c++-common/cxxbitfields-6.c: New test. * c-c++-common/cxxbitfields-6.c: New test.
......
/* PR tree-optimization/50133 */
/* { dg-do compile } */
/* { dg-options "-O -ftree-vectorize -fno-tree-loop-im" } */
extern int A[], B[];
void
foo (int z)
{
int j, i;
for (j = 0; j < 32; j++)
{
int a = A[0];
for (i = 0; i < 16; i++)
a = A[i] ? a : z;
B[j] = a;
}
}
...@@ -1419,7 +1419,6 @@ vect_finish_stmt_generation (gimple stmt, gimple vec_stmt, ...@@ -1419,7 +1419,6 @@ vect_finish_stmt_generation (gimple stmt, gimple vec_stmt,
stmt_vec_info stmt_info = vinfo_for_stmt (stmt); stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info); loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info); bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
gimple_stmt_iterator si;
gcc_assert (gimple_code (stmt) != GIMPLE_LABEL); gcc_assert (gimple_code (stmt) != GIMPLE_LABEL);
...@@ -1434,13 +1433,7 @@ vect_finish_stmt_generation (gimple stmt, gimple vec_stmt, ...@@ -1434,13 +1433,7 @@ vect_finish_stmt_generation (gimple stmt, gimple vec_stmt,
print_gimple_stmt (vect_dump, vec_stmt, 0, TDF_SLIM); print_gimple_stmt (vect_dump, vec_stmt, 0, TDF_SLIM);
} }
si = *gsi; gimple_set_location (vec_stmt, gimple_location (stmt));
if (is_gimple_debug (gsi_stmt (si)))
{
gsi_next_nondebug (&si);
gcc_assert (!gsi_end_p (si));
}
gimple_set_location (vec_stmt, gimple_location (gsi_stmt (si)));
} }
/* Checks if CALL can be vectorized in type VECTYPE. Returns /* Checks if CALL can be vectorized in type VECTYPE. Returns
......
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