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 10int buf[100]; 11 12int rd (int t1, int t2, int t3, int t4, int t5, int t6, int *p, int i) 13{ 14 int res = p[i]; 15 printf ("%d\n", res); 16 return res; 17} 18 19int mpx_test (int argc, const char **argv) 20{ 21 int *p; 22 23 rd (0, 0, 0, 0, 0, 0, buf, -1); 24 25 return 0; 26} 27