modernc.org/cc@v1.0.1/testdata/gcc-6.3.0/gcc/testsuite/gcc.c-torture/compile/pr34648.c (about)

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