* gcc.c-torture/compile/20000120-2.c: Use -fgnu89-inline.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr28489.c
blob766880fef25bf3afbc6f7a617dc0dde69c92c982
1 typedef int c_int;
2 union c_insn
4 void (*op) ();
5 c_int *mem;
6 c_int imm;
7 };
8 static union c_insn c_stack[((0x100 + 4) * 4)];
9 static struct c_ident *c_funcs;
10 static void (*c_op_bz) ();
11 static void c_direct (union c_insn *addr);
12 c_compile (int (*ext_getchar) (), void (*ext_rewind) (),
13 struct c_ident *externs)
15 c_direct (((void *) 0));
17 static void
18 c_direct (union c_insn *addr)
20 union c_insn *pc = addr;
21 union c_insn *sp = c_stack;
22 c_int imm = 0;
23 static void *ops[] = {
24 &&op_index, &&op_assign, &&op_add_a, &&op_sub_a, &&op_mul_a, &&op_div_a,
25 &&op_mod_a, &&op_or_a, &&op_xor_a, &&op_and_a, &&op_shl_a, &&op_shr_a,
28 c_op_bz = &&op_bz;
30 goto *(pc++)->op;
31 op_bz:if (imm)
34 op_push_imm_imm:(sp - 2)->imm = imm;
35 goto *(pc - 1)->op;
36 op_index:imm = *((sp - 3)->mem += imm);
37 op_assign:*(sp - 3)->mem = imm;
38 op_add_a:imm = *(sp - 3)->mem += imm;
39 op_sub_a:imm = *(sp - 3)->mem -= imm;
40 op_mul_a:imm = *(sp - 3)->mem *= imm;
41 op_div_a:imm = *(sp - 3)->mem /= imm;
42 op_mod_a:imm = *(sp - 3)->mem %= imm;
43 op_or_a:imm = *(sp - 3)->mem |= imm;
44 op_xor_a:imm = *(sp - 3)->mem ^= imm;
45 op_and_a:imm = *(sp - 3)->mem &= imm;
46 op_shl_a:imm = *(sp - 3)->mem <<= imm;
47 op_shr_a:imm = *(sp - 3)->mem >>= imm;