https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105802
--- 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:4a6b8d9aad9f68eec223cc126d9effbf45e37271 commit r13-925-g4a6b8d9aad9f68eec223cc126d9effbf45e37271 Author: Richard Biener <rguent...@suse.de> Date: Wed Jun 1 15:42:06 2022 +0200 tree-optimization/105802 - another unswitching type issue This also fixes the type of the irange used for unswitching of switch statements. PR tree-optimization/105802 * tree-ssa-loop-unswitch.cc (find_unswitching_predicates_for_bb): Make sure to also compute the range in the type of the switch index. * g++.dg/opt/pr105802.C: New testcase.