URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// PR 10352
|
// PR 10352
|
// { dg-do compile }
|
// { dg-do compile }
|
// { dg-options -O2 }
|
// { dg-options -O2 }
|
|
|
extern double fabs(double x);
|
extern double fabs(double x);
|
|
|
typedef struct { float x, y; } S;
|
typedef struct { float x, y; } S;
|
typedef struct _T T;
|
typedef struct _T T;
|
|
|
extern void fT( T *p );
|
extern void fT( T *p );
|
extern T *h();
|
extern T *h();
|
extern S g( );
|
extern S g( );
|
|
|
static
|
static
|
int f(void)
|
int f(void)
|
{
|
{
|
T *t=0;
|
T *t=0;
|
int c=0;
|
int c=0;
|
S s;
|
S s;
|
|
|
const S exp_s = {0.,0.};
|
const S exp_s = {0.,0.};
|
|
|
if(!(t = h()))
|
if(!(t = h()))
|
{
|
{
|
c++;
|
c++;
|
}
|
}
|
|
|
if(!c)
|
if(!c)
|
{
|
{
|
s = g();
|
s = g();
|
if( (fabs( (s.x) - (exp_s.x) ) > 1 )
|
if( (fabs( (s.x) - (exp_s.x) ) > 1 )
|
|| (fabs( (s.y) - (exp_s.y) ) > 1 ) )
|
|| (fabs( (s.y) - (exp_s.y) ) > 1 ) )
|
{
|
{
|
c++;
|
c++;
|
}
|
}
|
}
|
}
|
|
|
if(t)
|
if(t)
|
fT(t);
|
fT(t);
|
|
|
return c;
|
return c;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.