URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
typedef struct { int re; int im; } T;
|
typedef struct { int re; int im; } T;
|
|
|
T f (int, int);
|
T f (int, int);
|
|
|
#if COMPILER != 1
|
#if COMPILER != 1
|
T
|
T
|
f (int arg1, int arg2)
|
f (int arg1, int arg2)
|
{
|
{
|
T x;
|
T x;
|
x.re = arg1;
|
x.re = arg1;
|
x.im = arg2;
|
x.im = arg2;
|
return x;
|
return x;
|
}
|
}
|
#endif
|
#endif
|
|
|
#if COMPILER != 2
|
#if COMPILER != 2
|
main ()
|
main ()
|
{
|
{
|
T result;
|
T result;
|
result = f (3, 4);
|
result = f (3, 4);
|
if (result.re != 3 || result.im != 4)
|
if (result.re != 3 || result.im != 4)
|
abort ();
|
abort ();
|
exit (0);
|
exit (0);
|
}
|
}
|
#endif
|
#endif
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.