Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / struct-arg-5-ubv.c
blobc94ae1c24aaf50c85f1a9077866582fab44e48c8
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 int i1;
14 int i2;
15 } s1;
17 int rd (int *p1, int *p2, int *p3, struct s1 s)
19 int res = s.p[s.i1 + s.i2];
20 printf ("%d\n", res);
21 return res;
24 int buf[100];
25 int buf1[10];
27 int mpx_test (int argc, const char **argv)
29 struct s1 s;
30 s.p = buf;
31 s.i1 = 50;
32 s.i2 = 50;
34 rd (buf1, buf1, buf1, s);
36 return 0;