https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109473
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:54ddf6426e04e4b0d24bbc7e37d40acbf5fbfe3b commit r11-10676-g54ddf6426e04e4b0d24bbc7e37d40acbf5fbfe3b Author: Richard Biener <rguent...@suse.de> Date: Wed Apr 12 10:22:08 2023 +0200 tree-optimization/109473 - ICE with reduction epilog adjustment op The following makes sure to carry out the reduction epilog adjustment in the original computation type which for pointers is an unsigned integer type. There's a similar issue with signed vs. unsigned ops and overflow which is fixed by this as well. PR tree-optimization/109473 * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert scalar result to the computation type before performing the reduction adjustment. * gcc.dg/vect/pr109473.c: New testcase. (cherry picked from commit df7f55cb2ae550adeda339a57b657ebe1ad39367)