blob: 9292d182e37bd2463b085ab77e487c8592215d33 [file] [log] [blame]
/* PR tree-optimization/109215 */
/* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */
struct S {};
struct T { struct S s[3]; struct S t; };
void foo (struct S *);
void
bar (struct T *t)
{
foo (&t->s[2]); /* { dg-bogus "array subscript 2 is outside the bounds of an interior zero-length array" } */
}
void
baz (struct T *t)
{
foo (&t->s[3]); /* { dg-error "" "" { xfail *-*-* } } */
}