Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / pointer-store-1-lbv.c
blobbde8c76e4b7282cda3e2fa321ec3a9269960264e
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, -1);
30 return 0;