[Bug middle-end/94994] [10/11 Regression] possible miscompilation of word-at-a-time copy via packed structs

rsandifo at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 30 11:24:16 GMT 2020


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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Seems to be caused by:

/* Get the minimum alignment for all the scalar accesses that DR_INFO
   describes.  */

static unsigned int
vect_vfa_align (dr_vec_info *dr_info)
{
  return TYPE_ALIGN_UNIT (TREE_TYPE (DR_REF (dr_info->dr)));
}

providing duff alignment information.  Changing it to:

  return dr_alignment (dr_info->dr);

fixes the bug.


More information about the Gcc-bugs mailing list