[Bug middle-end/98190] [11 Regression] GCC11 miscompiles code using _Bool when inlining: bfxil instruction misused since r11-165

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 10 08:22:46 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98190

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49727
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49727&action=edit
gcc11-pr98190.patch

So, I have bootstrapped/regtested this patch last night on x86_64, i686,
aarch64, armv7hl, powerpc64le (and s390x still pending) linux.
Unfortunately, on aarch64 it regresses:
gcc.c-torture/execute/pr93213.c
and on powerpc64le that test plus:
g++.dg/warn/Wstrict-aliasing-bogus-char-1.C
gcc.dg/pr87273.c
gcc.dg/torture/pr91656-1.c
gcc.dg/tree-ssa/pr92085-2.c
gcc.dg/tree-ssa/pr94703.c

Seems the assumption that for promoted SUBREG to_rtx the store is always to all
the bits is incorrect, e.g. on pr93213.c  the memcpy is copying just half of
the bits.  So, shall we check the bitpos 0 bitsize all to_rtx bits for the
store_rtx case and otherwise check depending on endianity if the most
significant bit of to_rtx is overwritten and extend in that case?


More information about the Gcc-bugs mailing list