This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

[Committed] Fix libgfortran failures for HP-UX


I've boostrapped and regression tested the below patch on
amd64-*-freebsd.  The original submitter of the libgfortran
failures has verified that gfortran again passes the
regression tests on hppa2.0w-hp-hpux11.11.

2006-10-13  Steven G. Kargl  <kargl@gcc.gnu.org>

	* m4/spacing.m4: Use scalbn[f,l] if ldexp[f,l] is unavailable.
	* m4/rrspacing.m4: Ditto.
	* generated/spacing_r4.c: Regenerated.
	* generated/spacing_r8.c: Ditto.
	* generated/spacing_r10.c: Ditto.
	* generated/spacing_r16.c: Ditto.
	* generated/rrspacing_r4.c: Ditto.
	* generated/rrspacing_r8.c: Ditto.
	* generated/rrspacing_r10.c: Ditto.
	* generated/rrspacing_r16.c: Ditto.


Index: libgfortran/m4/spacing.m4
===================================================================
--- libgfortran/m4/spacing.m4	(revision 117702)
+++ libgfortran/m4/spacing.m4	(working copy)
@@ -34,7 +34,7 @@ Boston, MA 02110-1301, USA.  */
 
 include(`mtype.m4')dnl
 
-`#if defined (HAVE_'real_type`) && defined (HAVE_FREXP'Q`) && defined (HAVE_LDEXP'Q`)'
+`#if defined (HAVE_'real_type`) && defined (HAVE_FREXP'Q`)'
 
 extern real_type spacing_r`'kind (real_type s, int p, int emin, real_type tiny);
 export_proto(spacing_r`'kind);
@@ -48,7 +48,11 @@ spacing_r`'kind (real_type s, int p, int
   frexp`'q (s, &e);
   e = e - p;
   e = e > emin ? e : emin;
+`#if defined (HAVE_LDEXP'Q`)'
   return ldexp`'q (1., e);
+#else
+  return scalbn`'q (1., e);
+#endif
 }
 
 #endif
Index: libgfortran/m4/rrspacing.m4
===================================================================
--- libgfortran/m4/rrspacing.m4	(revision 117702)
+++ libgfortran/m4/rrspacing.m4	(working copy)
@@ -34,7 +34,7 @@ Boston, MA 02110-1301, USA.  */
 
 include(`mtype.m4')dnl
 
-`#if defined (HAVE_'real_type`) && defined (HAVE_FABS'Q`) && defined (HAVE_FREXP'Q`) && defined (HAVE_LDEXP'Q`)'
+`#if defined (HAVE_'real_type`) && defined (HAVE_FABS'Q`) && defined (HAVE_FREXP'Q`)'
 
 extern real_type rrspacing_r`'kind (real_type s, int p);
 export_proto(rrspacing_r`'kind);
@@ -48,7 +48,12 @@ rrspacing_r`'kind (real_type s, int p)
   if (x == 0.)
     return 0.;
   frexp`'q (s, &e);
+`#if defined (HAVE_LDEXP'Q`)'
   return ldexp`'q (x, p - e);
+#else
+  return scalbn`'q (x, p - e);
+#endif
+
 }
 
 #endif

-- 
steve


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