Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / struct-arg-10-lbv.c
blob8375aa1b820e0e640583ed9d5284d01f8e852f8b
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 struct s1
12 int *p;
13 } s1;
15 int rd (int *p1, int *p2, int *p3, int *p4, int *p5, int *p6, struct s1 s, int i)
17 int res = s.p[i];
18 printf ("%d\n", res);
19 return res;
22 int buf[100];
23 int buf1[10];
25 int mpx_test (int argc, const char **argv)
27 struct s1 s;
28 s.p = buf;
30 rd (buf1, buf1, buf1, buf1, buf1, buf1, s, -1);
32 return 0;