https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109473
--- Comment #5 from CVS 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:df7f55cb2ae550adeda339a57b657ebe1ad39367 commit r13-7147-gdf7f55cb2ae550adeda339a57b657ebe1ad39367 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.