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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr46777.c] - Blame information for rev 754

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR rtl-optimization/46777 */
2
/* { dg-do compile } */
3
/* { dg-options "-fgcse -O -fno-tree-dominator-opts -funroll-loops" } */
4
 
5
struct S { char s[256]; };
6
 
7
static inline int
8
foo (int x, int y)
9
{
10
  switch (x)
11
    {
12
    case 1:
13
    case 2:
14
      return 3;
15
    case 3:
16
    case 4:
17
      return 2;
18
    case 5:
19
      switch (y)
20
        {
21
        case 4:
22
          return 1;
23
        }
24
    }
25
  return 0;
26
}
27
 
28
void
29
bar (struct S *x, int *y, int *z, int **w)
30
{
31
  switch (*y ? x->s[*y] : foo (y[1], y[0]))
32
    {
33
    case 3:
34
      if (y + 2 == z)
35
        for (;;)
36
          {
37
            y += 2;
38
            switch (*y ? x->s[*y] : foo (y[1], y[0]))
39
              {
40
              case 6:
41
                break;
42
              default:
43
                *w = y;
44
              }
45
            if (y == z)
46
              break;
47
          }
48
    }
49
}

powered by: WebSVN 2.1.0

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