]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.c-torture/compile/pr70199.c
re PR middle-end/70199 (Crash at -O2 when using labels.)
[thirdparty/gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr70199.c
1 static volatile int v = 0;
2 static
3 void benchmark(long runs) {
4 void* labels[] = {
5 &&l0, &&l1, &&l2
6 };
7 for(unsigned int mask = 0x1F; mask > 0; mask >>= 1) {
8 unsigned lfsr = 0xACE1u;
9 long n = 10000000;
10 while(n > 0) {
11 l2: v;
12 l1: v;
13 goto *labels[lfsr & mask];
14 l0: n--;
15 }
16 }
17 }
18 int f(void) {
19 benchmark(10000000);
20 }