URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
/* PR rtl-optimization/16536
|
/* PR rtl-optimization/16536
|
Origin: Jeremy Denise <jeremy.denise@libertysurf.fr>
|
Origin: Jeremy Denise <jeremy.denise@libertysurf.fr>
|
Reduced: Wolfgang Bangerth <bangerth@dealii.org>
|
Reduced: Wolfgang Bangerth <bangerth@dealii.org>
|
Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
|
Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
|
|
|
extern void abort ();
|
extern void abort ();
|
|
|
typedef struct
|
typedef struct
|
{
|
{
|
int i, dummy;
|
int i, dummy;
|
} A;
|
} A;
|
|
|
inline A foo (const A* p, const A* q)
|
inline A foo (const A* p, const A* q)
|
{
|
{
|
return (A){p->i+q->i};
|
return (A){p->i+q->i};
|
}
|
}
|
|
|
void bar (A* __restrict__ p)
|
void bar (A* __restrict__ p)
|
{
|
{
|
*p=foo(p,p);
|
*p=foo(p,p);
|
if (p->i!=2)
|
if (p->i!=2)
|
abort();
|
abort();
|
}
|
}
|
|
|
int main ()
|
int main ()
|
{
|
{
|
A a={1};
|
A a={1};
|
bar(&a);
|
bar(&a);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.