From: Richard Biener Date: Fri, 22 May 2015 12:34:46 +0000 (+0000) Subject: re PR middle-end/66251 (ICE in vect_get_vec_def_for_operand, at tree-vect-stmts.c... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ac5a14092e76fe71a3d8660a30079e35d2618f5;p=gcc.git re PR middle-end/66251 (ICE in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1484) 2015-05-22 Richard Biener PR tree-optimization/66251 * tree-vect-stmts.c (vectorizable_conversion): Properly set STMT_VINFO_VEC_STMT even for the SLP case. * gfortran.fortran-torture/compile/pr66251.f90: New testcase. From-SVN: r223552 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4bda82ed9e..ee48b8e8bc1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-22 Richard Biener + + PR tree-optimization/66251 + * tree-vect-stmts.c (vectorizable_conversion): Properly + set STMT_VINFO_VEC_STMT even for the SLP case. + 2015-05-22 Marek Polacek * doc/extend.texi: Use @pxref instead of @xref. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 912dd1549f4..6f795ade1b9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-05-22 Richard Biener + + PR tree-optimization/66251 + * gfortran.fortran-torture/compile/pr66251.f90: New testcase. + 2015-05-22 Marek Polacek PR c/47043 diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/pr66251.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/pr66251.f90 new file mode 100644 index 00000000000..f5b04bc8391 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/compile/pr66251.f90 @@ -0,0 +1,7 @@ +SUBROUTINE dbcsr_data_convert (n) + COMPLEX(KIND=4), DIMENSION(:), POINTER :: s_data_c + COMPLEX(KIND=8), DIMENSION(:), POINTER :: t_data_z + t_data_z(1:n) = CMPLX(s_data_c(1:n), KIND=8) + CALL foo() +END SUBROUTINE dbcsr_data_convert + diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 1f68ff52698..1e7b13562df 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -3964,14 +3964,12 @@ vectorizable_conversion (gimple stmt, gimple_stmt_iterator *gsi, if (slp_node) SLP_TREE_VEC_STMTS (slp_node).quick_push (new_stmt); + + if (!prev_stmt_info) + STMT_VINFO_VEC_STMT (stmt_info) = new_stmt; else - { - if (!prev_stmt_info) - STMT_VINFO_VEC_STMT (stmt_info) = new_stmt; - else - STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt; - prev_stmt_info = vinfo_for_stmt (new_stmt); - } + STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt; + prev_stmt_info = vinfo_for_stmt (new_stmt); } }