https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109115
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:72b52751c60abb327c73716259485d04b8eabe4f commit r13-6653-g72b52751c60abb327c73716259485d04b8eabe4f Author: Jakub Jelinek <ja...@redhat.com> Date: Tue Mar 14 09:15:38 2023 +0100 tree-vect-patterns: Fix up ICE in upper_bound [PR109115] As mentioned in the PR, range_of_expr returns false if the type of the expression isn't suitable for corresponding range type, but doesn't if the range is undefined for other reasons. Still, lower/upper_bound is defined only for ranges which actually have at least one pair of subranges, VR_UNDEFINED range doesn't have it. 2023-03-14 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/109115 * tree-vect-patterns.cc (vect_recog_divmod_pattern): Don't use r.upper_bound () on r.undefined_p () range. * gcc.dg/pr109115.c: New test.