Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr84859.c
blob577b561545d9fbc8d2671342c0d88fcf2d6a0cda
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Warray-bounds -fdump-tree-phiopt1" } */
4 void
5 h (const void *p, unsigned n)
7 unsigned char a[8];
8 if (n > sizeof a)
9 return;
11 for (; n > 0; n -= *a)
13 if (n > 255)
14 *a = 255;
15 else
16 *a = n;
18 __builtin_memcpy (a, p, *a); /* { dg-bogus "bounds" } */
22 /* { dg-final { scan-tree-dump "MIN_EXPR" "phiopt1" } } */