summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c
blob: 6e6d067fb5062d5a3f7f84a7a57fd01d2de8fbf5 (plain)
1
2
3
4
5
6
7
8
9
10
/* { dg-do compile { target { ! x32 } } } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt" } */
/* { dg-final { scan-tree-dump-not "bndcl" "chkpopt" } } */
/* { dg-final { scan-tree-dump-not "bndcu" "chkpopt" } } */

int test (int *p)
{
  p = (int *)__builtin___bnd_set_ptr_bounds (p, sizeof (int));
  return *p;
}