From 5e3c2d4c683546748ea64ac2904e1fcc40300d64 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Wed, 8 Nov 2006 21:53:02 +0000 Subject: [PATCH] builtin-math-3.c: Add more sincos tests. * gcc.dg/torture/builtin-math-3.c: Add more sincos tests. From-SVN: r118600 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/torture/builtin-math-3.c | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1a6cf27a3fb..d8c8baa98e0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2006-11-08 Kaveh R. Ghazi + + * gcc.dg/torture/builtin-math-3.c: Add more sincos tests. + 2006-11-08 Dorit Nuzman * gcc.dg/vect/vect-1.c: Loop with multiple types removed (appears in diff --git a/gcc/testsuite/gcc.dg/torture/builtin-math-3.c b/gcc/testsuite/gcc.dg/torture/builtin-math-3.c index afa78dc1580..c8bef533211 100644 --- a/gcc/testsuite/gcc.dg/torture/builtin-math-3.c +++ b/gcc/testsuite/gcc.dg/torture/builtin-math-3.c @@ -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... */ -- 2.30.2