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

            Bug ID: 79278
           Summary: get_object_alignment and RTL expansion are wrong for
                    ADJUST_FIELD_ALIGN using targets/types
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

Currently for indirect accesses to types that are affected by
ADJUST_FIELD_ALIGN
both get_object_alignment and RTL expansion generate wrong alignment
expectations.
For example on x86_64:

double bar (double *p)
{
  return *p;
}

(insn 6 5 7 (set (reg:DF 90)
        (mem:DF (reg/v/f:SI 88 [ p ]) [1 *p_2(D)+0 S8 A64])) "t.c":16 -1
     (nil))


For UBSAN a hack (min_align_of_type) was added rather than fixing the
underlying issue.

Reply via email to