https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108805
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Uros Bizjak <u...@gcc.gnu.org>: https://gcc.gnu.org/g:6ac3ebed5ffbac0d81c5a1d0cb1e345cfad202a8 commit r13-6117-g6ac3ebed5ffbac0d81c5a1d0cb1e345cfad202a8 Author: Uros Bizjak <ubiz...@gmail.com> Date: Fri Feb 17 15:58:12 2023 +0100 simplify-rtx: Fix VOIDmode operand handling in simplify_subreg [PR108805] simplify_subreg can return VOIDmode const_int operand and will cause ICE in simplify_gen_subreg when this operand is passed to it. The patch uses int_outermode instead of GET_MODE of temporary as the innermode argument of simplify_gen_subreg. 2023-02-17 Uroš Bizjak <ubiz...@gmail.com> gcc/ChangeLog: PR target/108805 * simplify-rtx.cc (simplify_context::simplify_subreg): Use int_outermode instead of GET_MODE (tem) to prevent VOIDmode from entering simplify_gen_subreg. gcc/testsuite/ChangeLog: PR target/108805 * gcc.dg/pr108805.c: New test.