PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr70460.c
blob04fa1efc19937bcc5c9e3ae7539929741b7eb64a
1 /* { dg-require-effective-target indirect_jumps } */
2 /* { dg-require-effective-target label_values } */
3 /* { dg-skip-if "label differences not supported" { avr-*-* } } */
5 /* PR rtl-optimization/70460 */
7 int c;
9 __attribute__((noinline, noclone)) void
10 foo (int x)
12 static int b[] = { &&lab1 - &&lab0, &&lab2 - &&lab0 };
13 void *a = &&lab0 + b[x];
14 goto *a;
15 lab1:
16 c += 2;
17 lab2:
18 c++;
19 lab0:
23 int
24 main ()
26 foo (0);
27 if (c != 3)
28 __builtin_abort ();
29 foo (1);
30 if (c != 4)
31 __builtin_abort ();
32 return 0;