summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr56023.c
blob: f1942ac18c9f865dee268549d66330d4e5bb71c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */

void
foo (char *c)
{
  unsigned int x = 0;
  unsigned int i;

  for (i = 0; c[i]; i++)
    {
      if (i >= 5 && x != 1)
	break;
      else if (c[i] == ' ')
	x = i;
      else if (c[i] == '/' && c[i + 1] != ' ' && i)
	x = i + 1;
    }
}