re PR middle-end/66251 (ICE in vect_get_vec_def_for_operand, at tree-vect-stmts.c...
authorRichard Biener <rguenther@suse.de>
Fri, 22 May 2015 12:34:46 +0000 (12:34 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 22 May 2015 12:34:46 +0000 (12:34 +0000)
2015-05-22  Richard Biener  <rguenther@suse.de>

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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/compile/pr66251.f90 [new file with mode: 0644]
gcc/tree-vect-stmts.c

index a4bda82ed9ebc7cbe7cacea8ffb9277fc39107c4..ee48b8e8bc1f611b4dc4e4c22ec84ec39e98026a 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-22  Richard Biener  <rguenther@suse.de>
+
+       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  <polacek@redhat.com>
 
        * doc/extend.texi: Use @pxref instead of @xref.
index 912dd1549f4300dfe9d43fc8d4b5ed639bbc5dbb..6f795ade1b9e819f104aab77bfb9da86980278cb 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-22  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/66251
+       * gfortran.fortran-torture/compile/pr66251.f90: New testcase.
+
 2015-05-22  Marek Polacek  <polacek@redhat.com>
 
        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 (file)
index 0000000..f5b04bc
--- /dev/null
@@ -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
+
index 1f68ff52698e035378c25224237643251371ed84..1e7b13562df1e4eb5f67d2fc8a567e33a22533f5 100644 (file)
@@ -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);
            }
        }