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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [20020415-1.c] - Blame information for rev 708

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR target/6303
2
   This testcase ICEd because s390 did not define
3
   ASM_SIMPLIFY_DWARF_ADDR hook.  */
4
/* { dg-do compile { target fpic } } */
5
/* { dg-options "-O2 -fpic -g" } */
6
 
7
static inline char *
8
bar (unsigned long x, char *y)
9
{
10
  extern const char ext[];
11
  const char *a = ext;
12
  char *b = y;
13
 
14
  do *--b = a[x % 10]; while ((x /= 10) != 0);
15
  return b;
16
}
17
 
18
struct A { char *p, *q; };
19
struct B { int r, s; };
20
 
21
int
22
foo (struct A *a, const struct B *b)
23
{
24
  char c[(b->r > b->s) ? b->r : b->s];
25
  char *d = &c[sizeof c];
26
  register char *e;
27
 
28
  e = bar (b->r, d);
29
  while (e < d)
30
    {
31
      register const int f = *e++;
32
      if (((a->p >= a->q) ? 1 : (unsigned char) (*a->p++ = f)) == -1)
33
        break;
34
    }
35
}

powered by: WebSVN 2.1.0

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