[Bug middle-end/93582] [10 Regression] -Warray-bounds gives error: array subscript 0 is outside array bounds of struct E[1]

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 5 19:16:00 GMT 2020


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

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #12)
> The warning is in dead code, but due to the optimize_bit_field_compare
> "optimization" we aren't able to find that out until combine.

I am not a fan of that optimization inside fold (mainly because it is way too
early).  Though replacing it requires a lot other changes; lower bit-field
accesses, a few optimizations to reassociation, and then dealing with the other
optimization fall outs due to lowering bit-field accesses (mostly store
merging).  I am working towards that goal for GCC 11.  Obviously it is way too
late to get that into GCC 10 :).


More information about the Gcc-bugs mailing list