summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/indjmp-1.c
blob: bbcb24363673d90031200a72f787654fbd5570e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile  { target ia32 } } */
/* { dg-options "-O2" } */

#define ADVANCE_AND_DISPATCH() goto *addresses[*pc++]

void
Interpret(const unsigned char *pc)
{
    static const void *const addresses[] = {
      &&l0, &&l1, &&l2
    };

l0:
    ADVANCE_AND_DISPATCH();

l1:
    ADVANCE_AND_DISPATCH();

l2:
    return;
}

/* { dg-final { scan-assembler-not "jmp\[ \t\]*.%eax" } } */