1 /* { dg-do run } */
2 /* { dg-options "-fcheck-pointer-bounds -mmpx" } */
3 
4 
5 #include "mpx-check.h"
6 
7 int buf[100];
8 int buf1[10];
9 
rd(int * t1,int * t2,int * t3,int * t4,int * p,int i)10 int rd (int *t1, int *t2, int *t3, int *t4, int *p, int i)
11 {
12   int res = p[i];
13   printf ("%d\n", res);
14   return res;
15 }
16 
mpx_test(int argc,const char ** argv)17 int mpx_test (int argc, const char **argv)
18 {
19   int *p;
20 
21   rd (buf1, buf1, buf1, buf1, buf, 0);
22   rd (buf1, buf1, buf1, buf1, buf, 99);
23 
24   return 0;
25 }
26