]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/i386/chkp-const-check-2.c
ipa-chkp.c: New.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / i386 / chkp-const-check-2.c
1 /* { dg-do compile } */
2 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */
3
4 int test (int *p)
5 {
6 p = (int *)__builtin___bnd_set_ptr_bounds (p, sizeof (int));
7 return *(p + 1); /* { dg-warning "memory access check always fail" "" } */
8 }