http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54570

             Bug #: 54570
           Summary: [4.8 Regression] FAIL: gcc.dg/builtin-object-size-8.c
                    execution test
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: rgue...@gcc.gnu.org


I broke it by making early FRE more reliably figure out address equivalences.

extern void abort (void);
union A
{
  int a1;
  char a2[3];
};
int main()
{
  union A *a = __builtin_malloc (212);
  if (__builtin_object_size (&a->a1, 1) != 4
      || __builtin_object_size (&a->a2, 1) != 212)
    abort ();
  return 0;
}

Would break in similar ways with struct { int a[]; } a; and &a vs. &a.a.

Reply via email to