]> git.ipfire.org Git - thirdparty/gcc.git/commit
expr: Fix ICE on BFmode -> SFmode conversion of constant [PR107262]
authorJakub Jelinek <jakub@redhat.com>
Wed, 19 Oct 2022 09:29:44 +0000 (11:29 +0200)
committerJakub Jelinek <jakub@redhat.com>
Wed, 19 Oct 2022 09:29:44 +0000 (11:29 +0200)
commit65b98fc763d14d371fcf37a17e33519012ec2bac
treee9961f79899f56a602bb92e27a76505844b96aba
parent07cc4c1da1046f0ffda241d59df796417c122ff5
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  <jakub@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.
gcc/expr.cc
gcc/testsuite/gcc.dg/pr107262.c [new file with mode: 0644]