Tests: Defeat inlining of math functions by GCC >= 4.3.0.
authorBruno Haible <bruno@clisp.org>
Sun, 24 Jan 2010 20:22:00 +0000 (21:22 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 24 Jan 2010 20:23:07 +0000 (21:23 +0100)
ChangeLog
tests/test-acosl.c
tests/test-asinl.c
tests/test-atanl.c
tests/test-cosl.c
tests/test-expl.c
tests/test-logl.c
tests/test-sinl.c
tests/test-sqrtl.c
tests/test-tanl.c

index 6b0735259d0fbc4a01f5c45cdd358ebad74ae697..f2a0c7b28831eb404ffe78fc811351e71139300f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2010-01-24  Bruno Haible  <bruno@clisp.org>
+
+       Tests: Defeat inlining of math functions by GCC >= 4.3.0.
+       * tests/test-acosl.c (x): New variable.
+       (main): Store argument in x and fetch it from x.
+       * tests/test-asinl.c (x): New variable.
+       (main): Store argument in x and fetch it from x.
+       * tests/test-atanl.c (x): New variable.
+       (main): Store argument in x and fetch it from x.
+       * tests/test-cosl.c (x): New variable.
+       (main): Store argument in x and fetch it from x.
+       * tests/test-expl.c (x): New variable.
+       (main): Store argument in x and fetch it from x.
+       * tests/test-logl.c (x): New variable.
+       (main): Store argument in x and fetch it from x.
+       * tests/test-sinl.c (x): New variable.
+       (main): Store argument in x and fetch it from x.
+       * tests/test-sqrtl.c (x): New variable.
+       (main): Store argument in x and fetch it from x.
+       * tests/test-tanl.c (x): New variable.
+       (main): Store argument in x and fetch it from x.
+
 2010-01-24  Bruno Haible  <bruno@clisp.org>
 
        Provide EXEEXT and srcdir in TESTS_ENVIRONMENT by default.
index 5f9591974568ccc1a2cb52dab3ed180e777136d6..9533def5c2c26e9f6ffad150d9235aefb5debc7c 100644 (file)
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (acosl, long double, (long double));
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@ main ()
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
   /* A particular value.  */
-  y = acosl (0.6L);
+  x = 0.6L;
+  y = acosl (x);
   ASSERT (y >= 0.9272952180L && y <= 0.9272952181L);
 
   return 0;
index 811f2d0ded024f43f6ff81517cf6459517c7dfb3..8b604573471d4f6dc35b5f400004464d2f06feef 100644 (file)
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (asinl, long double, (long double));
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@ main ()
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
   /* A particular value.  */
-  y = asinl (0.6L);
+  x = 0.6L;
+  y = asinl (x);
   ASSERT (y >= 0.6435011087L && y <= 0.6435011088L);
 
   return 0;
index e78e82327325c8d3522d1ad1aa9bb41dcf4f06d1..c365401647368868a9d046ad1be5f61f9110a064 100644 (file)
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (atanl, long double, (long double));
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@ main ()
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
   /* A particular value.  */
-  y = atanl (0.6L);
+  x = 0.6L;
+  y = atanl (x);
   ASSERT (y >= 0.5404195002L && y <= 0.5404195003L);
 
   return 0;
index 5e63fdd355178dc8673cd2a7ac5f6ded67aaf7a1..a13e75f84ea4af2baa6525688e23effbfed8f46d 100644 (file)
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (cosl, long double, (long double));
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@ main ()
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
   /* A particular value.  */
-  y = cosl (0.6L);
+  x = 0.6L;
+  y = cosl (x);
   ASSERT (y >= 0.8253356149L && y <= 0.8253356150L);
 
   return 0;
index fe671c8bdf4198e10a59ed8d7f7352ef1817fb93..440bc0ef602d5d40d6a134fcf23ad1285699319d 100644 (file)
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (expl, long double, (long double));
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@ main ()
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
   /* A particular value.  */
-  y = expl (0.6L);
+  x = 0.6L;
+  y = expl (x);
   ASSERT (y >= 1.822118800L && y <= 1.822118801L);
 
   return 0;
index 12bf62425d0c280c543ddd856b9f7ef1910d0c8b..357df92de2bdbd7bbd32dabf6cfba636a22075b2 100644 (file)
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (logl, long double, (long double));
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@ main ()
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
   /* A particular value.  */
-  y = logl (0.6L);
+  x = 0.6L;
+  y = logl (x);
   ASSERT (y >= -0.5108256238L && y <= -0.5108256237L);
 
   return 0;
index 19e7e62ff8f2c9a214d1dd5745f8b88c8f3075eb..8d69b26cee0ce83ed7c7fd8177522327c7b122a1 100644 (file)
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (sinl, long double, (long double));
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@ main ()
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
   /* A particular value.  */
-  y = sinl (0.6L);
+  x = 0.6L;
+  y = sinl (x);
   ASSERT (y >= 0.5646424733L && y <= 0.5646424734L);
 
   return 0;
index 2bf34fa0047d378e58e4d6a5ddf96774d2ead0e0..a7baef783c55300075ac2f65fa40b8da1dec5b5d 100644 (file)
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (sqrtl, long double, (long double));
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@ main ()
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
   /* A particular value.  */
-  y = sqrtl (0.6L);
+  x = 0.6L;
+  y = sqrtl (x);
   ASSERT (y >= 0.7745966692L && y <= 0.7745966693L);
 
   return 0;
index 3d692fc6ced5710f6972ecea86375ee925970eba..6e105cb4b6a7af2e795f830d4f8916632059847f 100644 (file)
@@ -26,6 +26,7 @@ SIGNATURE_CHECK (tanl, long double, (long double));
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@ main ()
   BEGIN_LONG_DOUBLE_ROUNDING ();
 
   /* A particular value.  */
-  y = tanl (0.6L);
+  x = 0.6L;
+  y = tanl (x);
   ASSERT (y >= 0.6841368083L && y <= 0.6841368084L);
 
   return 0;