URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* PR target/6303
|
/* PR target/6303
|
This testcase ICEd because s390 did not define
|
This testcase ICEd because s390 did not define
|
ASM_SIMPLIFY_DWARF_ADDR hook. */
|
ASM_SIMPLIFY_DWARF_ADDR hook. */
|
/* { dg-do compile { target fpic } } */
|
/* { dg-do compile { target fpic } } */
|
/* { dg-options "-O2 -fpic -g" } */
|
/* { dg-options "-O2 -fpic -g" } */
|
|
|
static inline char *
|
static inline char *
|
bar (unsigned long x, char *y)
|
bar (unsigned long x, char *y)
|
{
|
{
|
extern const char ext[];
|
extern const char ext[];
|
const char *a = ext;
|
const char *a = ext;
|
char *b = y;
|
char *b = y;
|
|
|
do *--b = a[x % 10]; while ((x /= 10) != 0);
|
do *--b = a[x % 10]; while ((x /= 10) != 0);
|
return b;
|
return b;
|
}
|
}
|
|
|
struct A { char *p, *q; };
|
struct A { char *p, *q; };
|
struct B { int r, s; };
|
struct B { int r, s; };
|
|
|
int
|
int
|
foo (struct A *a, const struct B *b)
|
foo (struct A *a, const struct B *b)
|
{
|
{
|
char c[(b->r > b->s) ? b->r : b->s];
|
char c[(b->r > b->s) ? b->r : b->s];
|
char *d = &c[sizeof c];
|
char *d = &c[sizeof c];
|
register char *e;
|
register char *e;
|
|
|
e = bar (b->r, d);
|
e = bar (b->r, d);
|
while (e < d)
|
while (e < d)
|
{
|
{
|
register const int f = *e++;
|
register const int f = *e++;
|
if (((a->p >= a->q) ? 1 : (unsigned char) (*a->p++ = f)) == -1)
|
if (((a->p >= a->q) ? 1 : (unsigned char) (*a->p++ = f)) == -1)
|
break;
|
break;
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.