c++: Implement for namespace statics CWG 2867 - Order of initialization for structure...
[official-gcc.git] / gcc / testsuite / gcc.dg / pr99122-3.c
blob3e72a303277448d44209ca820c8f6110ca396541
1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu17 -O2 -g -w" } */
4 static int foo ();
6 int
7 bar (int n)
9 return foo (n, 2.0);
12 static inline int
13 foo (int n, struct T { char a[n]; } b)
15 int r = 0, i;
16 for (i = 0; i < n; i++)
17 r += b.a[i];
18 return r;