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

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;
    }
}