modula2: M2MetaError.{def,mod} and P2SymBuild.mod further cleanup
[official-gcc.git] / gcc / testsuite / gcc.dg / pr99122-2.c
blob3947f7dcdc80886c7fe1c1c52d858380a48f80cd
1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu17 -O2 -g -w" } */
3 /* { dg-require-effective-target alloca } */
5 static int foo ();
7 int
8 bar (int n)
10 struct S { char a[n]; } x;
11 __builtin_memset (x.a, 0, n);
12 return foo (n, x);
15 static inline int
16 foo (int n, struct T { char a[n]; } b)
18 int r = 0, i;
19 for (i = 0; i < n; i++)
20 r += b.a[i];
21 return r;