blob: 47e2315de0e91ae9c257bbf09bba6fb043f10704 [file] [log] [blame]
/* PR middle-end/87099 */
/* { dg-do compile } */
/* { dg-require-effective-target alloca } */
/* { dg-options "-Wstringop-overflow" } */
void bar (char *);
int
foo (int n)
{
char v[n];
bar (v);
return __builtin_strncmp (&v[1], "aaa", 3);
}
int
baz (int n, char *s)
{
char v[n];
bar (v);
return __builtin_strncmp (&v[1], s, 3);
}