Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/Warray-bounds-4.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-O2 -Wall" } */ | |
3 | |
4 typedef unsigned int DWORD; | |
5 | |
6 static void g(DWORD * p, int n) | |
7 { | |
8 int i; | |
9 | |
10 for (i = 0; i < n && !p[n - 1]; i++); /* { dg-bogus "subscript is above array bounds" } */ | |
11 } | |
12 | |
13 void f() { | |
14 DWORD arr[8]; | |
15 | |
16 g(arr, 4); | |
17 } |