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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [arm/] [pr42093.c] - Blame information for rev 714

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-options "-mthumb -O2 -fno-reorder-blocks" }  */
2
/* { dg-require-effective-target arm_thumb2_ok } */
3
/* { dg-final { scan-assembler-not "tbb" } } */
4
/* { dg-final { scan-assembler-not "tbh" } } */
5
 
6
#include <stdlib.h>
7
 
8
int gbl;
9
int foo (int *buf, int n)
10
{
11
  int ctr = 0;
12
  int c;
13
  while (1)
14
    {
15
      c = buf[ctr++];
16
      switch (c)
17
        {
18
        case '\n':
19
          gbl++;
20
          break;
21
 
22
        case ' ': case '\t' : case '\f' : case '\r':
23
          break;
24
 
25
        case ';':
26
          do
27
            c = buf [ctr++];
28
          while (c != '\n' && c != -1);
29
          gbl++;
30
          break;
31
 
32
        case '/':
33
          {
34
            int prevc;
35
            c = buf [ctr++];
36
            if (c != '*')
37
              abort ();
38
 
39
            prevc = 0;
40
            while ((c = buf[ctr++]) && c != -1)
41
              {
42
                if (c == '\n')
43
                  gbl++;
44
              }
45
            break;
46
          }
47
        default:
48
          return c;
49
        }
50
    }
51
}

powered by: WebSVN 2.1.0

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