Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / struct-copy-2-nov.c
blob01f5b679faf1ab01ddb1e4afd7324684324b1f35
1 /* { dg-do run } */
2 /* { dg-options "-fcheck-pointer-bounds -mmpx" } */
5 #include "mpx-check.h"
7 struct S {
8 int a;
9 int b[100];
10 int c;
11 } S;
13 int foo (void *p, int k)
15 struct S *s = (struct S*)p;
16 int res = s->b[k];
17 printf ("%d\n", res);
18 return res;
21 int mpx_test (int argc, const char **argv)
23 struct S s;
25 foo (&s.a, 0);
26 foo (&s.a, 99);
28 return 0;