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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20060215-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
/* PR middle-end/26300 */
2
 
3
struct S
4
{
5
  char c;
6
  struct S *d;
7
  struct S *e;
8
};
9
extern struct S *u, *v;
10
extern void fn1 (struct S *) __attribute__ ((noreturn));
11
void fn2 (struct S *);
12
 
13
static inline struct S *
14
fn3 (struct S *x)
15
{
16
  if (x->c != 6)
17
    fn1 (0);
18
  return (struct S *) x;
19
}
20
 
21
static inline int
22
fn4 (struct S *x)
23
{
24
  if (x != u)
25
    return 3;
26
  fn2 (x);
27
  return 0;
28
}
29
 
30
int
31
test (struct S *x)
32
{
33
  struct S *r;
34
  int m = 0;
35
 
36
  for (r = x; r != v; r = (fn3 (r)->d))
37
    if (r->c != 6)
38
      fn1 (x);
39
    else
40
      m |= 1 << (fn4 (fn3 (r)->e) - 1);
41
  return m;
42
}

powered by: WebSVN 2.1.0

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