Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / field-addr-10-ubv.c
blobb6a9ad07071bd3360d93fdf17e3e676825c70884
1 /* { dg-do run } */
2 /* { dg-shouldfail "bounds violation" } */
3 /* { dg-options "-fcheck-pointer-bounds -mmpx" } */
5 /* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */
7 #define SHOULDFAIL
9 #include "mpx-check.h"
11 struct S {
12 int arr[100];
13 } S;
15 struct S sa[10];
17 int rd (int *p, int i)
19 int res = p[i];
20 printf ("%d\n", res);
21 return res;
24 int mpx_test (int argc, const char **argv)
26 rd (&sa[argc].arr[0], 100);
28 return 0;