1 /* { dg-do run } */ 2 /* { dg-shouldfail "bounds violation" } */ 3 /* { dg-options "-fcheck-pointer-bounds -mmpx" } */ 4 5 6 #define SHOULDFAIL 7 8 #include "mpx-check.h" 9 10 int buf[100]; 11 int *p[1] = { buf }; 12 mpx_test(int argc,const char * argv[])13int mpx_test (int argc, const char *argv[]) 14 { 15 printf ("%d\n", p[0][-1]); 16 17 return 0; 18 } 19