summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c
blob: 47e62e7834ddccb9f3a57afa0effccc122f9ae4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do run } */
/* { dg-options "-fno-check-pointer-bounds" } */


#include "mpx-check.h"

int buf[100];

int mpx_test (int argc, const char **argv)
{
  __bnd_chk_ptr_bounds (buf - 1, sizeof (int));
  __bnd_chk_ptr_bounds (buf + 100, sizeof (int));
  return 0;
}