Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / field-addr-2-ubv.c
blobb07b09ff808aab5f843e3762e6ece2c644d1b391
1 /* { dg-do run } */
2 /* { dg-shouldfail "bounds violation" } */
3 /* { dg-options "-fcheck-pointer-bounds -mmpx" } */
5 /* { dg-additional-options "-fchkp-first-field-has-own-bounds" } */
7 #define SHOULDFAIL
9 #include "mpx-check.h"
11 struct S {
12 int a;
13 int b[100];
14 int c;
15 } S;
17 int foo (int *i, int k)
19 printf ("%d\n", i[k]);
20 return i[k];
23 int mpx_test (int argc, const char **argv)
25 struct S s;
27 foo(&s.a, 1);
29 return 0;