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

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Thu Dec 10 11:39:38 GMT 2020


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

--- Comment #16 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 10 Dec 2020, jakub at gcc dot gnu.org wrote:

> 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?

in foo() you mean?  For

  __builtin_memmove (&u16_1, &u128_1, 1);

?  So that's a parameter destination - does it at least have correctly
DECL_NOT_GIMPLE_REG_P set?  Did expansion really do sth different
when we had it TREE_ADDRESSABLE?


More information about the Gcc-bugs mailing list