1 /* PR middle-end/87099 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target alloca } */
4 /* { dg-options "-Wstringop-overflow" } */
5
6 void bar (char *);
7
8 int
9 foo (int n)
10 {
11 char v[n];
12 bar (v);
13 return __builtin_strncmp (&v[1], "aaa", 3);
14 }
15
16 int
17 baz (int n, char *s)
18 {
19 char v[n];
20 bar (v);
21 return __builtin_strncmp (&v[1], s, 3);
22 }