Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / vla-stexp-2.c
blob9f1512567f0fc27708705ea4ac18a5df93073c03
1 /* PR101838 */
2 /* { dg-do run } */
3 /* { dg-options "-Wpedantic -O0" } */
4 /* { dg-require-effective-target alloca } */
7 int bar0(
8 int (*a)[*],
9 int (*b)[sizeof(*a)]
13 int bar(
14 struct f { /* { dg-warning "will not be visible outside of this definition" } */
15 int a[*]; } v, /* { dg-warning "variably modified type" } */
16 int (*b)[sizeof(struct f)] // should not warn about zero size
19 int foo(void)
21 int n = 0;
22 return sizeof(typeof(*({ n = 10; struct foo { /* { dg-warning "braced-groups" } */
23 int x[n]; /* { dg-warning "variably modified type" } */
24 } x; &x; })));
28 int main()
30 if (sizeof(struct foo { int x[10]; }) != foo())
31 __builtin_abort();
33 return 0;