https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109473
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:053668dbf11bb61c63fa7db5b3bccd0fdac9e726 commit r12-9412-g053668dbf11bb61c63fa7db5b3bccd0fdac9e726 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.cc (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)