Do not use fabsl() in float2.c test
Some targets may support long double variables but in the same time may lack support of long double functions like fabsl(). Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
This commit is contained in:
@@ -22,6 +22,7 @@ int main (void)
|
|||||||
void *values[MAX_ARGS];
|
void *values[MAX_ARGS];
|
||||||
float f;
|
float f;
|
||||||
long double ld;
|
long double ld;
|
||||||
|
long double original;
|
||||||
|
|
||||||
args[0] = &ffi_type_float;
|
args[0] = &ffi_type_float;
|
||||||
values[0] = &f;
|
values[0] = &f;
|
||||||
@@ -49,7 +50,8 @@ int main (void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* These are not always the same!! Check for a reasonable delta */
|
/* These are not always the same!! Check for a reasonable delta */
|
||||||
if (fabsl(ld - ldblit(f)) < LDBL_EPSILON)
|
original = ldblit(f);
|
||||||
|
if (((ld > original) ? (ld - original) : (original - ld)) < LDBL_EPSILON)
|
||||||
puts("long double return value tests ok!");
|
puts("long double return value tests ok!");
|
||||||
else
|
else
|
||||||
CHECK(0);
|
CHECK(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user