2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr34648.c
blob8bcdae0501af1a4396faad30b4aace6660c9e3cb
1 /* PR tree-optimization/34648 */
3 /* { dg-options "-fexceptions" } */
5 extern const unsigned short int **bar (void) __attribute__ ((const));
6 const char *a;
7 int b;
8 char c;
10 char
11 foo (int *x)
13 char r;
15 c = '\0';
16 if (!b)
18 while (((*bar ())[a[*x]] & 0x2000) != 0)
19 (*x)++;
20 if (a[++(*x)] == '-')
22 (*x)++;
23 if (a[*x] && !((*bar ())[a[*x]] & 0x2000))
24 return '?';
26 if (!a[*x] || ((*bar ())[a[*x]] & 0x2000))
28 while (((*bar ())[a[*x]] & 0x2000))
29 ++(*x);
30 return '\0';
34 r = a[*x];
35 b = a[*x] && !((*bar ())[a[*x]] & 0x2000);
36 return r;