PR sanitizer/64121
[official-gcc.git] / gcc / testsuite / c-c++-common / ubsan / pr64121.c
blob614d72a22afd88d1256d2f499dc52b06a6c2b371
1 /* PR sanitizer/64121 */
2 /* { dg-do compile } */
3 /* { dg-options "-fsanitize=undefined -Wno-pointer-arith" } */
5 extern int tab[16];
7 void
8 execute (int *ip, int x)
10 int *xp = tab;
11 base:
12 if (x)
13 return;
14 *xp++ = *ip;
15 goto *(&&base + *ip);