URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
typedef struct {
|
typedef struct {
|
double epsilon;
|
double epsilon;
|
} material_type;
|
} material_type;
|
|
|
material_type foo(double x)
|
material_type foo(double x)
|
{
|
{
|
material_type m;
|
material_type m;
|
|
|
m.epsilon = 1.0 + x;
|
m.epsilon = 1.0 + x;
|
return m;
|
return m;
|
}
|
}
|
|
|
main()
|
main()
|
{
|
{
|
int i;
|
int i;
|
material_type x;
|
material_type x;
|
|
|
/* We must iterate enough times to overflow the FP stack on the
|
/* We must iterate enough times to overflow the FP stack on the
|
x86. */
|
x86. */
|
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
{
|
{
|
x = foo (1.0);
|
x = foo (1.0);
|
if (x.epsilon != 1.0 + 1.0)
|
if (x.epsilon != 1.0 + 1.0)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.