comparison gcc/testsuite/gcc.dg/Warray-bounds-13.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Warray-bounds" } */
3
4 extern char *bar[17];
5
6 int foo(int argc, char **argv)
7 {
8 int i;
9 int n = 0;
10
11 for (i = 0; i < argc; i++)
12 n++;
13
14 for (i = 0; i < argc; i++)
15 argv[i] = bar[i + n]; /* { dg-bogus "above array bounds" } */
16
17 return 0;
18 }