RISC-V: Add support for riscv-*-*.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 980329-1.c
blob3b3fe27cf714ad18e6b0caf8577a4eaf723fa9f6
1 typedef __SIZE_TYPE__ size_t;
2 struct re_pattern_buffer
4 unsigned char *buffer;
5 unsigned long int used;
6 };
7 struct re_registers
9 int *start;
12 static const char **regstart, **regend;
13 static const char **old_regend;
15 static int
16 re_match_2_internal (struct re_pattern_buffer *bufp,
17 struct re_registers *regs)
19 unsigned char *p = bufp->buffer;
20 unsigned char *pend = p + bufp->used;
22 for (;;)
24 int highest_active_reg = 1;
25 if (bufp)
27 int i;
28 for (i = 1;; i++)
29 regs->start[i] = 0;
32 switch ((unsigned int) *p++)
34 case 1:
36 unsigned char r = *p;
37 if (r)
38 highest_active_reg = r;
40 if (p + 2 == pend)
42 char is_a_jump_n = 0;
43 int mcnt = 0;
44 unsigned char *p1;
46 p1 = p + 2;
47 switch (*p1++)
49 case 2:
50 is_a_jump_n = 1;
51 case 1:
52 do { do { mcnt = *p1; } while (0); p1 += 2; } while (0);
53 if (is_a_jump_n)
54 p1 = 0;
57 if (mcnt && *p1 == 0)
59 unsigned r;
60 for (r = 0; r < (unsigned) *p + (unsigned) *(p + 1); r++)
62 if (regend[0] >= regstart[r])
63 regend[r] = old_regend[r];
65 do { while (0 < highest_active_reg + 1) { } } while (0);
71 return -1;