Commit 771fabc6d5379e64e5ab9e5f1ca6eb5960617432

Anatoly Trosinenko 2014-11-14T14:21:35

Take a float absolute value using fabs() instead of abs(). Replace integer abs() by floating point fabs() in the approximate equality check for float values.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/testsuite/libffi.call/cls_many_mixed_args.c b/testsuite/libffi.call/cls_many_mixed_args.c
index e4b1eb1..7fd6c82 100644
--- a/testsuite/libffi.call/cls_many_mixed_args.c
+++ b/testsuite/libffi.call/cls_many_mixed_args.c
@@ -63,7 +63,7 @@ int main (void)
 
   res = (((cls_ret_double)code))(0.1, 0.2, 0.3, 0.4, 5, 0.6, 0.7, 0.8, 0.9, 10,
                                  1.1, 12, 1.3, 14, 1.5, 16);
-  if (abs(res - expected) < FLT_EPSILON)
+  if (fabs(res - expected) < FLT_EPSILON)
     exit(0);
   else
     abort();