1  /* PR tree-optimization/34648 */
       2  
       3  /* { dg-options "-fexceptions" } */
       4  /* { dg-require-effective-target exceptions } */
       5  
       6  extern const unsigned short int **bar (void) __attribute__ ((const));
       7  const char *a;
       8  int b;
       9  char c;
      10  
      11  char
      12  foo (int *x)
      13  {
      14    char r;
      15  
      16    c = '\0';
      17    if (!b)
      18      {
      19        while (((*bar ())[a[*x]] & 0x2000) != 0)
      20          (*x)++;
      21        if (a[++(*x)] == '-')
      22          {
      23            (*x)++;
      24            if (a[*x] && !((*bar ())[a[*x]] & 0x2000))
      25              return '?';
      26          }
      27        if (!a[*x] || ((*bar ())[a[*x]] & 0x2000))
      28          {
      29            while (((*bar ())[a[*x]] & 0x2000))
      30              ++(*x);
      31            return '\0';
      32          }
      33      }
      34  
      35    r = a[*x];
      36    b = a[*x] && !((*bar ())[a[*x]] & 0x2000);
      37    return r;
      38  }
      39