[Bug tree-optimization/88621] [9 Regression] wrong code at -O1 and above on x86_64-linux-gnu in 64-bit mode (not in 32-bit mode)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 28 10:27:00 GMT 2018


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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The expander is unprepared to deal with MEM_REFs for bitfields, it really wants
to see a COMPONENT_REF for those cases, but the r267296 code happily creates
those.  *mem is COMPONENT_REF with first argument VAR_DECL e and second
argument FIELD_DECL b, (*slot)->mem.ref is a COMPONENT_REF with first argument
MEM_REF[&e, 0] and second argument FIELD_DECL b and the code happily creates a
MEM_REF out of this.  So, either we need to punt for the bitfield cases, or
e.g. handle the case where we have the same FIELD_DECL by creating a MEM_REF
for the base and use COMPONENT_REF on top of that and punt otherwise.


More information about the Gcc-bugs mailing list