URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* PR rtl-optimization/24899 */
|
/* PR rtl-optimization/24899 */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
__attribute__ ((noinline)) int
|
__attribute__ ((noinline)) int
|
foo (int x, int y, int *z)
|
foo (int x, int y, int *z)
|
{
|
{
|
int a, b, c, d;
|
int a, b, c, d;
|
|
|
a = b = 0;
|
a = b = 0;
|
for (d = 0; d < y; d++)
|
for (d = 0; d < y; d++)
|
{
|
{
|
if (z)
|
if (z)
|
b = d * *z;
|
b = d * *z;
|
for (c = 0; c < x; c++)
|
for (c = 0; c < x; c++)
|
a += b;
|
a += b;
|
}
|
}
|
|
|
return a;
|
return a;
|
}
|
}
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
if (foo (3, 2, 0) != 0)
|
if (foo (3, 2, 0) != 0)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.