* gcc.dg/stack-check-5.c: Skip with -fstack-protector.
[official-gcc.git] / gcc / testsuite / gcc.dg / Warray-bounds-4.c
blob71526f27ffd86cb261ff0da1111f26d96d9f6892
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall" } */
4 typedef unsigned int DWORD;
6 static void g(DWORD * p, int n)
8 int i;
10 for (i = 0; i < n && !p[n - 1]; i++); /* { dg-bogus "subscript is above array bounds" } */
13 void f() {
14 DWORD arr[8];
16 g(arr, 4);