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 
rd(int t1,int t2,int t3,int t4,int t5,int t6,int * p,int i)12 int 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 
mpx_test(int argc,const char ** argv)19 int mpx_test (int argc, const char **argv)
20 {
21   int *p;
22 
23   rd (0, 0, 0, 0, 0, 0, buf, 100);
24 
25   return 0;
26 }
27