builtin-math-3.c: Add more sincos tests.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 8 Nov 2006 21:53:02 +0000 (21:53 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 8 Nov 2006 21:53:02 +0000 (21:53 +0000)
* gcc.dg/torture/builtin-math-3.c: Add more sincos tests.

From-SVN: r118600

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/builtin-math-3.c

index 1a6cf27a3fb10acf222942562e3070bfe0ccf91b..d8c8baa98e03fa522e3cde1424b5f64d77376efd 100644 (file)
@@ -1,3 +1,7 @@
+2006-11-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * gcc.dg/torture/builtin-math-3.c: Add more sincos tests.
+
 2006-11-08  Dorit Nuzman  <dorit@il.ibm.com>
 
        * gcc.dg/vect/vect-1.c: Loop with multiple types removed (appears in
index afa78dc1580d8357f7696a5ab36bbc0e66926826..c8bef533211d5283faee18a3edeec059e74129d3 100644 (file)
@@ -90,9 +90,9 @@ extern void link_error(int);
 int main (void)
 {
 #ifdef __OPTIMIZE__
-  float sf, cf;
-  double s, c;
-  long double sl, cl;
+  float sf, cf, oneF = 1.0F;
+  double s, c, one = 1.0;
+  long double sl, cl, oneL = 1.0L;
 #endif
 
   TESTIT_R (asin, -1.0, -3.15/2.0, -3.14/2.0); /* asin(-1) == -pi/2 */
@@ -139,12 +139,14 @@ int main (void)
   TESTIT_R (tan, 1.0, 1.55, 1.56); /* tan(1) == 1.557... */
 
 #ifdef __OPTIMIZE__
-  /* These tests rely on propagating the variables s and c, which
+  /* These tests rely on propagating the variables s, c and one, which
      happens only when optimization is turned on.  */
   TESTIT_2P_R (sincos, -1.0, s, c, -0.85, -0.84, 0.54, 0.55); /* (s==-0.841..., c==0.5403...) */
   TESTIT_2P (sincos, 0.0, s, c, 0.0, 1.0); /* (s==0, c==1) */
   TESTIT_2P (sincos, -0.0, s, c, -0.0, 1.0); /* (s==-0, c==1) */
   TESTIT_2P_R (sincos, 1.0, s, c, 0.84, 0.85, 0.54, 0.55); /* (s==0.841..., c==0.5403...) */
+  TESTIT_2P_R (sincos, one, s, c, 0.84, 0.85, 0.54, 0.55); /* (s==0.841..., c==0.5403...) */
+  TESTIT_2P_R (sincos, -one, s, c, -0.85, -0.84, 0.54, 0.55); /* (s==-0.841..., c==0.5403...) */
 #endif
   
   TESTIT_R (sinh, -1.0, -1.18, -1.17); /* sinh(-1) == -1.175... */