aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1998-03-18 08:28:32 -0800
committerJim Wilson <wilson@gcc.gnu.org>1998-03-18 08:28:32 -0800
commit583708a6b96b211d3f3af2d6e814d6b54bd6daa2 (patch)
tree21fd8ce865d8f61998fb3c3be1aa1902eb3edd10 /gcc
parent9ef35dfbad594c0435c21d12bcb0fdc9c960fee2 (diff)
downloadgcc-583708a6b96b211d3f3af2d6e814d6b54bd6daa2.zip
gcc-583708a6b96b211d3f3af2d6e814d6b54bd6daa2.tar.gz
gcc-583708a6b96b211d3f3af2d6e814d6b54bd6daa2.tar.bz2
Testcase for reg-stack failure for testcase using fp conditional move.
* gcc.dg/980313-1.c: New test for fp conditional move on PPro. From-SVN: r18679
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.dg/980313-1.c21
2 files changed, 23 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4e9be0b..e5d3bef 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,10 +1,11 @@
Wed Mar 18 16:22:22 1998 Jim Wilson <wilson@cygnus.com>
+ * gcc.dg/980313-1.c: New test for fp conditional move on PPro.
* gcc.dg/980312-1.c: Fix typo in -march command.
Mon Mar 16 20:01:30 1998 H.J. Lu (hjl@gnu.org)
- * gcc.dg/980312-1.c: Another new test for fp on PPro.
+ * gcc.dg/980312-1.c: New test for fp conditional move on PPro.
Wed Mar 11 13:08:48 1998 Robert Lipe <robertl@dgii.com>
diff --git a/gcc/testsuite/gcc.dg/980313-1.c b/gcc/testsuite/gcc.dg/980313-1.c
new file mode 100644
index 0000000..746e463
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/980313-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+extern __inline double
+__expm1 (double __x)
+{
+ double __temp;
+ __temp -= 1.0;
+ return __temp;
+}
+extern __inline double
+__sgn1 (double __x)
+{
+ return __x >= 0.0 ? 1.0 : -1.0;
+}
+double
+tanh (double __x)
+{
+ register double __exm1 = __expm1 (__x);
+ return __exm1 / (__exm1 + 2.0) * __sgn1 (-__x);
+}