blob: 7b40a83887de76addd517e947ac9e475cdcff566 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* { dg-do compile } */
/* { dg-options "-O3 -Warray-bounds" } */
extern char *bar[17];
int foo(int argc, char **argv)
{
int i;
int n = 0;
for (i = 0; i < argc; i++)
n++;
for (i = 0; i < argc; i++)
argv[i] = bar[i + n]; /* { dg-bogus "above array bounds" } */
return 0;
}
|