https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111015
Mikael Pettersson <mikpelinux at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mikpelinux at gmail dot com --- Comment #3 from Mikael Pettersson <mikpelinux at gmail dot com> --- 10.5.0 is good, 11.4.0 and above are affected, started with (or was exposed by): commit ed01d707f8594827de95304371d5b62752410842 Author: Eric Botcazou <ebotca...@gcc.gnu.org> Date: Mon May 25 22:13:11 2020 +0200 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. gcc/ChangeLog | 9 +++++ gcc/gimple-ssa-store-merging.c | 20 ++++++++--- gcc/testsuite/ChangeLog | 4 +++ gcc/testsuite/gnat.dg/opt84.adb | 74 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gnat.dg/opt84.adb