aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr115137.c
blob: 9cd8ff936334ff3dc989b686508341102dfb407f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* { dg-do run } */

struct a {
  int b;
} c;

int d;
long e;

static void f(char *g, char *h, struct a *l) {
  char a[1024];
  int j = 0;

  if (d)
    h = a;

  for (; g < h; g++)
    if (__builtin_iscntrl(*g))
      ++j;

  while (l->b < j)
    ;
}

int main() {
  static const struct {
    char *input;
  } k[] = {{"somepage.html"}, {""}};

  for (unsigned int i = 0; i < 1; ++i) {
    e = __builtin_strlen(k[i].input);
    f(k[i].input, k[i].input + e, &c);
  }
}