23 lines
345 B
C
23 lines
345 B
C
/* 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);
|
|
}
|