https://gcc.gnu.org/g:3e8cc2f09de83dc203cd86573e39f2a3e9621d8a
commit r16-5116-g3e8cc2f09de83dc203cd86573e39f2a3e9621d8a Author: Robin Dapp <[email protected]> Date: Fri Nov 7 17:18:02 2025 +0100 vect: Give up if there is no offset_vectype. vect_gather_scatter_fn_p currently ICEs if offset_vectype is NULL. This is an oversight in the patches that relax gather/scatter detection. Catch this. gcc/ChangeLog: * tree-vect-data-refs.cc (vect_gather_scatter_fn_p): Bail if offset_vectype is NULL. Diff: --- gcc/tree-vect-data-refs.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index e8cfb884c1d0..b35ba05fd08b 100644 --- a/gcc/tree-vect-data-refs.cc +++ b/gcc/tree-vect-data-refs.cc @@ -4630,6 +4630,10 @@ vect_gather_scatter_fn_p (vec_info *vinfo, bool read_p, bool masked_p, tree offset_vectype = VECTOR_TYPE_P (offset_type) ? offset_type : get_vectype_for_scalar_type (vinfo, offset_type); + /* If there is no offset vectype, bail. */ + if (!offset_vectype) + return false; + offset_type = TREE_TYPE (offset_vectype); /* Get all supported configurations for this data vector type. */
