https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107262
--- Comment #2 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:65b98fc763d14d371fcf37a17e33519012ec2bac commit r13-3374-g65b98fc763d14d371fcf37a17e33519012ec2bac Author: Jakub Jelinek <ja...@redhat.com> Date: Wed Oct 19 11:29:44 2022 +0200 expr: Fix ICE on BFmode -> SFmode conversion of constant [PR107262] I forgot to handle the case where lowpart_subreg returns a VOIDmode CONST_INT, in that case convert_mode_scalar obviously doesn't work. The following patch fixes that. 2022-10-19 Jakub Jelinek <ja...@redhat.com> PR middle-end/107262 * expr.cc (convert_mode_scalar): For BFmode -> SFmode conversions of constants, use simplify_unary_operation if fromi has VOIDmode instead of recursive convert_mode_scalar. * gcc.dg/pr107262.c: New test.