This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A new test case for PPro (update)


> 
> I don't see the need for this testcase.  This is testing the exact same
> bug as the previous testcase, 980312-1.c.  There is no need to have two
> testcases for just one bug.
> 
> Jim
> 

There are more than one bugs on PPro. Here are the revised
test cases plus a patch to gcc.dg/980312-1.c. They
test inlined/nested functions with different combinations.

BTW, with my reg-stack.c patch, even when compile passes, but
link may fail. Your i386.md patch fixes the link part as
well as some compile.

-- 
H.J. Lu (hjl@gnu.org)
----
Tue Mar 17 08:14:21 1998  H.J. Lu  (hjl@gnu.org)

	* gcc.dg/980313-1.c: New to test fp on PPro.
	* gcc.dg/980313-2.c: Likewise.
	* gcc.dg/980313-3.c: Likewise.
	* gcc.dg/980313-4.c: Likewise.

Tue Mar 17 07:49:59 1998  H.J. Lu  (hjl@gnu.org)

	* gcc.dg/980312-1.c: Fix a typo.
	Do link instead of compile.

Index: gcc.dg/980312-1.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/testsuite/gcc.dg/980312-1.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 980312-1.c
--- gcc.dg/980312-1.c	1998/03/17 17:31:33	1.1.1.1
+++ gcc.dg/980312-1.c	1998/03/17 19:13:07
@@ -1,5 +1,5 @@
-/* { dg-do compile { target i?86-*-* } } */
-/* { dg-options "-O2 -mach=pentiumpro" } */
+/* { dg-do link { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
 
 extern __inline  double
 __expm1 (double __x)
@@ -17,4 +17,8 @@
 tanh (double __x)
 {
   return  __expm1 (__x) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
 }
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980313-1.c	Tue Mar 17 11:13:10 1998
@@ -0,0 +1,25 @@
+/* { dg-do link { 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);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980313-2.c	Tue Mar 17 11:13:14 1998
@@ -0,0 +1,25 @@
+/* { dg-do link { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+double
+tanh (double __x)
+{
+  double inline __expm1 (double __x)
+  {
+    double __temp;
+    __temp -= 1.0;
+    return __temp;
+  }
+
+  double inline __sgn1 (double __x)
+  {
+    return __x >= 0.0 ? 1.0 : -1.0;
+  }
+
+  double __exm1 = __expm1 (__x);
+  return __exm1 / (__exm1 + 2.0) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980313-3.c	Tue Mar 17 11:13:18 1998
@@ -0,0 +1,23 @@
+/* { dg-do link { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+double
+tanh (double __x)
+{
+  double __expm1 (double __x)
+  {
+    double __temp;
+    __temp = 1.0;
+    return __temp;
+  }
+  double __sgn1 (double __x)
+  {
+  return __x >= 0.0 ? 1.0 : -1.0;
+  }
+
+  return  __expm1 (__x) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ gcc.dg/980313-4.c	Tue Mar 17 11:13:23 1998
@@ -0,0 +1,23 @@
+/* { dg-do link { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentiumpro" } */
+
+double
+tanh (double __x)
+{
+  double inline __expm1 (double __x)
+  {
+    double __temp;
+    __temp = 1.0;
+    return __temp;
+  }
+  double  inline __sgn1 (double __x)
+  {
+  return __x >= 0.0 ? 1.0 : -1.0;
+  }
+
+  return  __expm1 (__x) * __sgn1 (-__x);
+}
+main ()
+{
+  return tanh (3.45) != 0;
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]