Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / if-stmt-2-ubv.c
blob3047f7b51041124a3532f40e9fc9e5c8988d08c7
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 rd (int *p1, int *p2, int i)
12 int res;
14 if (p1 > p2)
15 p1 = p2;
17 res = p1[i];
18 printf ("%d\n", res);
19 return res;
22 int buf[100];
24 int mpx_test (int argc, const char **argv)
26 int *p = __bnd_set_ptr_bounds (buf + 1, 40);
27 rd (buf, p, 100);
29 return 0;