aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-01-19 09:31:42 +0100
committerJakub Jelinek <jakub@redhat.com>2024-01-19 09:31:42 +0100
commit56778b69ce558bb7e3ab7c561ee4ee48ac20263b (patch)
tree61c93a8fa38f3756c46c79587055e2797718ffba /gcc/fortran
parent730a801f950e7817696067906cf40d590688387a (diff)
downloadgcc-56778b69ce558bb7e3ab7c561ee4ee48ac20263b.zip
gcc-56778b69ce558bb7e3ab7c561ee4ee48ac20263b.tar.gz
gcc-56778b69ce558bb7e3ab7c561ee4ee48ac20263b.tar.bz2
expansion: Fix ICEs with BLKmode VIEW_CONVERT_EXPR around non-BLKmode VAR_DECLs
On aarch64 the backend decides to use non-BLKmode for some arrays like unsigned long[4] - OImode in that case, but the corresponding BITINT_TYPEs have BLKmode (like structures containing that many limb elements). This later causes ICEs durring expansion when expanding VIEW_CONVERT_EXPR from non-BLKmode VAR_DECL to BLKmode BITINT_TYPE. The following fix contains two parts, the discover_nonconstant_array_refs_r is make sure we force such variables into memory and the expand_expr_real_1 change makes sure we don't try to extract a bitfield or something similar which doesn't really work for BLKmode - as op0 is a MEM, all we need is the op0 = adjust_address (op0, mode, 0); at the end to change the MEM's mode to BLKmode. 2024-01-19 Jakub Jelinek <jakub@redhat.com> Richard Biener <rguenther@suse.de> * cfgexpand.cc (discover_nonconstant_array_refs_r): Force non-BLKmode VAR_DECLs referenced in BLKmode VIEW_CONVERT_EXPRs into memory. * expr.cc (expand_expr_real_1) <case VIEW_CONVERT_EXPR>: Do nothing but adjust_address also for BLKmode mode and MEM op0.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions