Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / struct-copy-1-lbv.c
blob3f1ac74d9a7174038d5d79fdef6b929acd7fdc5e
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 struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } };
25 int mpx_test (int argc, const char *argv[])
27 struct s2 ss = s;
29 printf ("%d\n", ss.b[0].p[0][-1]);
31 return 0;