Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / static-init-6-lbv.c
blob9b90cee6a14aae06b83da9185c53caef7356de85
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[200];
13 struct s1 {
14 int a;
15 int *p[2];
16 } s1;
18 struct s2 {
19 int a;
20 struct s1 b[2];
21 } s2;
23 int mpx_test (int argc, const char **argv)
25 struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } };
27 printf ("%d\n", s.b[0].p[0][-1]);
29 return 0;