https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119757

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Li Pan from comment #8)
> 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.

That's for sure only papering over an issue elsewhere.  I will have a look.

Reply via email to