Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / pointer-store-1-ubv.c
blob4c8d45e003f242d8babff5fc125f2d8dbaf033d7
1 /* { dg-do run } */
2 /* { dg-shouldfail "bounds violation" } */
3 /* { dg-options "-fcheck-pointer-bounds -mmpx" } */
6 #define SHOULDFAIL
8 #include "mpx-check.h"
10 int *buf1[100];
11 int buf2[100];
13 void wr (int i)
15 buf1[i] = buf2;
18 int rd(int i, int j)
20 int res = buf1[i][j];
21 printf("%d\n", res);
22 return res;
25 int mpx_test (int argc, const char **argv)
27 wr(10);
28 rd(10, 100);
30 return 0;