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 prevents VOIDmode temporary from entering simplify_gen_subreg. We can't process const_int operand any further, since outermode is not an integer mode here. 2023-02-16 Uroš Bizjak gcc/ChangeLog: PR target/108805 * simplify_rtx.cc (simplify_context::simplify_subreg): Prevent VOIDmode const_int result from simplify_subreg from entering simplify_gen_subreg. gcc/testsuite/ChangeLog: PR target/108805 * gcc.dg/pr108805.c: New test. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. OK for master and release branches? Uros.