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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Otherwise, we happily consider in

struct S { char a[1]; int b; char c[1]; };
void
foo (struct S *p, int i, int j)
{
  p->c[i]
...
  p->c[j]
}

the above two as equivalent, while we should only consider those for p->a[i]
and p->a[j], where it is only valid to use i == j == 0.  If char c[2]; is used,
then max_size would indicate variable access, but for poor man's flexible array
member of size 1 array we need to avoid this, both during hashing and during
equality comparison.

Reply via email to