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>
diff --git a/testsuite/libffi.call/float2.c b/testsuite/libffi.call/float2.c
index 20a8c40..d583e22 100644
--- a/testsuite/libffi.call/float2.c
+++ b/testsuite/libffi.call/float2.c
@@ -22,6 +22,7 @@ int main (void)
void *values[MAX_ARGS];
float f;
long double ld;
+ long double original;
args[0] = &ffi_type_float;
values[0] = &f;
@@ -49,7 +50,8 @@ int main (void)
#endif
/* 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!");
else
CHECK(0);