https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108264
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:ee25e54233c6a1548eda06aa9a11f09cd7eb32ac commit r12-9135-gee25e54233c6a1548eda06aa9a11f09cd7eb32ac Author: Jakub Jelinek <ja...@redhat.com> Date: Tue Jan 3 12:13:24 2023 +0100 expr: Fix up store_expr into SUBREG_PROMOTED_* target [PR108264] The following testcase ICEs on s390x-linux (e.g. with -march=z13). The problem is that target is (subreg/s/u:SI (reg/v:DI 66 [ x+-4 ]) 4) and we call convert_move from temp to the SUBREG_REG of that, expecting to extend the value properly. That works nicely if temp has some scalar integer mode (or partial one), but ICEs when temp has V4QImode on the assertion that from and to modes have the same bitsize. store_expr generally allows say store from V4QI to SI target because they have the same size and if temp is a CONST_INT, we already have code to convert the constant properly, so the following patch just adds handling of non-scalar integer modes by converting them to the mode of target first before convert_move extends them. 2023-01-03 Jakub Jelinek <ja...@redhat.com> PR middle-end/108264 * expr.cc (store_expr): For stores into SUBREG_PROMOTED_* targets from source which doesn't have scalar integral mode first convert it to outer_mode. * gcc.dg/pr108264.c: New test. (cherry picked from commit 226a498733e7919de72eb6f1bf3e16883ad159f6)