changeset 12776:bebb37f7d22e

Tests: Defeat inlining of math functions by GCC >= 4.3.0.
author Bruno Haible <bruno@clisp.org>
date Sun, 24 Jan 2010 21:22:00 +0100
parents 03aab12b3f15
children 8e7ed08a499b
files 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
diffstat 10 files changed, 49 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/tests/test-acosl.c
+++ b/tests/test-acosl.c
@@ -26,6 +26,7 @@
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@
   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;
--- a/tests/test-asinl.c
+++ b/tests/test-asinl.c
@@ -26,6 +26,7 @@
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@
   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;
--- a/tests/test-atanl.c
+++ b/tests/test-atanl.c
@@ -26,6 +26,7 @@
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@
   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;
--- a/tests/test-cosl.c
+++ b/tests/test-cosl.c
@@ -26,6 +26,7 @@
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@
   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;
--- a/tests/test-expl.c
+++ b/tests/test-expl.c
@@ -26,6 +26,7 @@
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@
   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;
--- a/tests/test-logl.c
+++ b/tests/test-logl.c
@@ -26,6 +26,7 @@
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@
   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;
--- a/tests/test-sinl.c
+++ b/tests/test-sinl.c
@@ -26,6 +26,7 @@
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@
   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;
--- a/tests/test-sqrtl.c
+++ b/tests/test-sqrtl.c
@@ -26,6 +26,7 @@
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@
   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;
--- a/tests/test-tanl.c
+++ b/tests/test-tanl.c
@@ -26,6 +26,7 @@
 #include "fpucw.h"
 #include "macros.h"
 
+volatile long double x;
 long double y;
 
 int
@@ -36,7 +37,8 @@
   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;