1 /* { dg-do compile { target { ! x32 } } } */ 2 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized -Wchkp" } */ 3 /* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ 4 5 struct S 6 { 7 int a; 8 int b; 9 int c; 10 }; 11 test(struct S * ps)12int test (struct S *ps) 13 { 14 int *pi = &ps->b; 15 return *(pi + 1); /* { dg-warning "memory access check always fail" } */ 16 } 17