URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O2 -funit-at-a-time" } */
|
/* { dg-options "-O2 -funit-at-a-time" } */
|
/* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "link_error,%r" { xfail hppa*64*-*-* } } else { scan-assembler-not "link_error" } } } */
|
/* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "link_error,%r" { xfail hppa*64*-*-* } } else { scan-assembler-not "link_error" } } } */
|
/* In unit-at-time the functions should be assembled in order
|
/* In unit-at-time the functions should be assembled in order
|
e q t main, so we realize that they are pure. The test is
|
e q t main, so we realize that they are pure. The test is
|
xfailed on hppa64 because variable r in q is sign extended
|
xfailed on hppa64 because variable r in q is sign extended
|
to 64-bits. As a result, "if (t!=mem)" is not simplified. */
|
to 64-bits. As a result, "if (t!=mem)" is not simplified. */
|
|
|
static int mem;
|
static int mem;
|
static int e(void) __attribute__ ((noinline));
|
static int e(void) __attribute__ ((noinline));
|
static int q(void) __attribute__ ((noinline));
|
static int q(void) __attribute__ ((noinline));
|
static int t(void) __attribute__ ((noinline));
|
static int t(void) __attribute__ ((noinline));
|
main()
|
main()
|
{
|
{
|
return t();
|
return t();
|
}
|
}
|
static t()
|
static t()
|
{
|
{
|
int r,e;
|
int r,e;
|
if (mem)
|
if (mem)
|
t();
|
t();
|
e=mem;
|
e=mem;
|
r=q();
|
r=q();
|
if (e!=mem)
|
if (e!=mem)
|
link_error();
|
link_error();
|
return r;
|
return r;
|
}
|
}
|
static int e()
|
static int e()
|
{
|
{
|
return 0;
|
return 0;
|
}
|
}
|
static int q()
|
static int q()
|
{
|
{
|
int t=mem,r;
|
int t=mem,r;
|
r=e();
|
r=e();
|
if (t!=mem)
|
if (t!=mem)
|
link_error();
|
link_error();
|
return r;
|
return r;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.