Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / c-c++-common / Wunused-var-8.c
blob8c49ed2fa5cd7581707582f40bf23c08267a7441
1 /* Origin: PR c++/44108 */
2 /* { dg-options "-Wunused" } */
3 /* { dg-do compile } */
4 /* { dg-require-effective-target alloca } */
6 int
7 foo ()
9 unsigned int M = 2;
10 const unsigned int M_CONST = 2;
11 static unsigned int M_STATIC = 2;
12 static const unsigned int M_STATIC_CONST = 2;
14 char n1[M];
15 char n2[M_CONST];
16 char n3[M_STATIC];
17 char n4[M_STATIC_CONST];
19 return sizeof (n1) + sizeof (n2) + sizeof (n3) + sizeof (n4);