OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr34415.c] - Blame information for rev 816

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
const char *__attribute__((noinline))
2
foo (const char *p)
3
{
4
  const char *end;
5
  int len = 1;
6
  for (;;)
7
    {
8
      int c = *p;
9
      c = (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c);
10
      if (c == 'B')
11
        end = p;
12
      else if (c == 'A')
13
        {
14
          end = p;
15
          do
16
            p++;
17
          while (*p == '+');
18
        }
19
      else
20
        break;
21
      p++;
22
      len++;
23
    }
24
  if (len > 2 && *p == ':')
25
    p = end;
26
  return p;
27
}
28
 
29
int
30
main (void)
31
{
32
  const char *input = "Bbb:";
33
  return foo (input) != input + 2;
34
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.