Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / malloc-1-nov.c
blob56f26e964d844dd13391a4aa5c8a48339e035010
1 /* { dg-do run } */
2 /* { dg-options "-fcheck-pointer-bounds -mmpx" } */
5 #include "mpx-check.h"
7 int rd (int *p, int i)
9 int res = p[i];
10 printf ("%d\n", res);
11 return res;
14 int mpx_test (int argc, const char **argv)
16 int *buf = (int *)malloc (100 * sizeof(int));
18 rd (buf, 0);
19 rd (buf, 99);
21 free (buf);
23 return 0;