2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / chkp-narrow-bounds.c
blobab1b122479a96f4c428dea31cc5d2286f14c6935
1 /* { dg-do compile { target { ! x32 } } } */
2 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkp" } */
3 /* { dg-final { scan-tree-dump "bndcl" "chkp" } } */
4 /* { dg-final { scan-tree-dump "bndcu" "chkp" } } */
6 int
7 test (int *p)
9 int *p1 = __bnd_narrow_ptr_bounds (p - 10, p, sizeof (int) * 20);
10 return p1[10];