1 /* { dg-do run } */ 2 /* { dg-options "-fcheck-pointer-bounds -mmpx" } */ 3 4 5 #include "mpx-check.h" 6 7 int buf[100]; 8 mpx_test(int argc,const char ** argv)9int mpx_test (int argc, const char **argv) 10 { 11 int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); 12 p = __bnd_init_ptr_bounds (p); 13 p[-1] = argc; 14 p[10] = argc; 15 return 0; 16 } 17