https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119757
Li Pan <pan2.li at intel dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pan2.li at intel dot com
--- Comment #8 from Li Pan <pan2.li at intel dot com> ---
Reproduced from today's upstream, looks like out-of-range access, and a simple
fix may looks like below:
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index ecb4a6521de..93386851089 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -832,7 +832,7 @@ vect_get_and_check_slp_defs (vec_info *vinfo, unsigned char
swap,
/* Now match the operand definition types to that of the first stmt. */
for (i = 0; i < number_of_oprnds;)
{
- if (skip_args[i])
+ if (skip_args[i] || stmt_num >= oprnd_info->def_stmts.length ())
{
++i;
continue;
Not sure if my understanding is correct, as well as possibly a more complicated
reason.