summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c
blob: 839cf788e7c68be1a59d9e6c063f5895e9aae5ae (plain)
1
2
3
4
5
6
7
8
/* { dg-do compile { target { ! x32 } } } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */

int test (int *p)
{
  p = (int *)__builtin___bnd_set_ptr_bounds (p, sizeof (int));
  return *(p + 1); /* { dg-warning "memory access check always fail" } */
}