Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / Wzero-length-array-bounds-3.c
blob9292d182e37bd2463b085ab77e487c8592215d33
1 /* PR tree-optimization/109215 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Wall" } */
5 struct S {};
6 struct T { struct S s[3]; struct S t; };
7 void foo (struct S *);
9 void
10 bar (struct T *t)
12 foo (&t->s[2]); /* { dg-bogus "array subscript 2 is outside the bounds of an interior zero-length array" } */
15 void
16 baz (struct T *t)
18 foo (&t->s[3]); /* { dg-error "" "" { xfail *-*-* } } */