aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-25 22:13:11 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-25 22:19:03 +0200
commited01d707f8594827de95304371d5b62752410842 (patch)
treef42cb873d39181ee91f8fe52962b57a66c1b0c3e /gcc/cfgexpand.c
parent14cd049afcb992ac334b4a2ad7be42ee78fe31eb (diff)
downloadgcc-ed01d707f8594827de95304371d5b62752410842.zip
gcc-ed01d707f8594827de95304371d5b62752410842.tar.gz
gcc-ed01d707f8594827de95304371d5b62752410842.tar.bz2
Fix internal error on store to FP component at -O2
This is about a GIMPLE verification failure at -O2 or above because the GIMPLE store merging pass generates a NOP_EXPR between a FP type and an integral type. This happens when the bit-field insertion path is taken for a FP field, which can happen in Ada for bit-packed record types. It is fixed by generating an intermediate VIEW_CONVERT_EXPR. The patch also tames a little the bit-field insertion path because, for bit-packed record types in Ada, you can end up with large bit-field regions, which results in a lot of mask-and-shifts instructions. gcc/ChangeLog * gimple-ssa-store-merging.c (merged_store_group::can_be_merged_into): Only turn MEM_REFs into bit-field stores for small bit-field regions (imm_store_chain_info::output_merged_store): Be prepared for sources with non-integral type in the bit-field insertion case. (pass_store_merging::process_store): Use MAX_BITSIZE_MODE_ANY_INT as the largest size for the bit-field case. gcc/testsuite/ChangeLog * gnat.dg/opt84.adb: New test.
Diffstat (limited to 'gcc/cfgexpand.c')
0 files changed, 0 insertions, 0 deletions