summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-08 21:53:02 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-08 21:53:02 +0000
commit72ecd20bfceb79895395d3ad8d6b6ba59d4f1dfb (patch)
tree252af5c874ce731cc73e60b53f0c0f2008aca1e8 /gcc
parente4a7b8dc026207d55b713ade4709e30858293212 (diff)
downloadgcc-72ecd20bfceb79895395d3ad8d6b6ba59d4f1dfb.tar.gz
* gcc.dg/torture/builtin-math-3.c: Add more sincos tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118600 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-math-3.c10
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 <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
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... */