2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / chkp-label-address.c
blob979c33e93e3455690a3e449617a69b73c692483b
1 /* { dg-do compile { target { ! x32 } } } */
2 /* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */
4 #include <stdio.h>
6 static int f1 () /* { dg-warning "function cannot be instrumented" "" } */
8 static int array = &&label_B - &&label_A;
10 label_A:
12 printf ("%d\n", array);
14 label_B:
16 return 0;
19 int f2 (int i)
21 printf ("%d\n", i);
22 return f1 ();