Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mpx / bitfields-1-lbv.c
blobdeca6fd6a97bc81f6b3368d3bc22b85a5597e35a
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 struct s {
11 int a;
12 int b : 10;
13 int c : 1;
14 int e : 10;
15 } s;
17 #define HH (unsigned char)1
19 int foo (struct s *p)
21 int val = p->b;
22 printf ("%d\n", val);
23 return val == HH;
26 int mpx_test (int argc, const char **argv)
28 struct s buf[100];
30 foo (buf - 1);
32 return 0;