Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / struct-arg-9-lbv.c
blobacce18334adf635beaf935b6c5cd141a1f7ab93f
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 {
11 int *p[2];
12 } s1;
14 int rd (struct s1 s, int i)
16 int res = s.p[1][i];
17 printf ("%d\n", res);
18 return res;
21 int buf[100];
22 int buf1[100];
24 int mpx_test (int argc, const char **argv)
26 struct s1 s = { {buf, buf1} };
28 rd (s, -1);
30 return 0;