https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117041
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:72c83f644dea755b4eba427aabde45f5d3694d9b commit r15-4201-g72c83f644dea755b4eba427aabde45f5d3694d9b Author: Richard Biener <rguent...@suse.de> Date: Wed Oct 9 11:42:59 2024 +0200 tree-optimization/117041 - fix load classification of former grouped load When we first detect a grouped load but later dis-associate it we only set DR_GROUP_FIRST_ELEMENT to NULL, indicating it is not a STMT_VINFO_GROUPED_ACCESS but leave DR_GROUP_NEXT_ELEMENT set. This causes a stray DR_GROUP_NEXT_ELEMENT access in get_group_load_store_type to go wrong, indicating a load isn't single_element_p when it actually is, leading to wrong classification and an ICE. PR tree-optimization/117041 * tree-vect-stmts.cc (get_group_load_store_type): Only check DR_GROUP_NEXT_ELEMENT for STMT_VINFO_GROUPED_ACCESS. * gcc.dg/torture/pr117041.c: New testcase.