File gcc48-remove-mpfr-2.4.0-requirement.patch of Package gcc6

Index: configure.ac
===================================================================
--- configure.ac	(revision 216911)
+++ configure.ac	(working copy)
@@ -1454,7 +1454,7 @@ if test -d ${srcdir}/gcc && test "x$have
     AC_MSG_CHECKING([for the correct version of mpfr.h])
     AC_TRY_COMPILE([#include <gmp.h>
     #include <mpfr.h>],[
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0)
+    #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1)
     choke me
     #endif
     ], [AC_TRY_COMPILE([#include <gmp.h>
Index: configure
===================================================================
--- configure	(revision 216911)
+++ configure	(working copy)
@@ -5524,7 +5524,7 @@ int
 main ()
 {
 
-    #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0)
+    #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,1)
     choke me
     #endif
 
Index: gcc/fortran/simplify.c
===================================================================
--- gcc/fortran/simplify.c	(revision 216911)
+++ gcc/fortran/simplify.c	(working copy)
@@ -4278,10 +4278,7 @@ gfc_simplify_mod (gfc_expr *a, gfc_expr
 	    return &gfc_bad_expr;
 	  }
 
-	gfc_set_model_kind (kind);
-	mpfr_fmod (result->value.real, a->value.real, p->value.real,
-		   GFC_RND_MODE);
-	break;
+	return NULL;
 
       default:
 	gfc_internal_error ("gfc_simplify_mod(): Bad arguments");
@@ -4327,19 +4324,7 @@ gfc_simplify_modulo (gfc_expr *a, gfc_ex
 	    return &gfc_bad_expr;
 	  }
 
-	gfc_set_model_kind (kind);
-	mpfr_fmod (result->value.real, a->value.real, p->value.real,
-		   GFC_RND_MODE);
-	if (mpfr_cmp_ui (result->value.real, 0) != 0)
-	  {
-	    if (mpfr_signbit (a->value.real) != mpfr_signbit (p->value.real))
-	      mpfr_add (result->value.real, result->value.real, p->value.real,
-			GFC_RND_MODE);
-	  }
-	else
-	  mpfr_copysign (result->value.real, result->value.real,
-			 p->value.real, GFC_RND_MODE);
-	break;
+	return NULL;
 
       default:
 	gfc_internal_error ("gfc_simplify_modulo(): Bad arguments");
Index: gcc/ubsan.c
===================================================================
--- gcc/ubsan.c.orig	2015-06-01 14:52:11.717105684 +0200
+++ gcc/ubsan.c	2015-06-01 14:52:26.945253071 +0200
@@ -1564,40 +1564,6 @@
 	  min = build_real (expr_type, minval2);
 	}
     }
-  else if (REAL_MODE_FORMAT (mode)->b == 10)
-    {
-      /* For _Decimal128 up to 34 decimal digits, - sign,
-	 dot, e, exponent.  */
-      char buf[64];
-      mpfr_t m;
-      int p = REAL_MODE_FORMAT (mode)->p;
-      REAL_VALUE_TYPE maxval, minval;
-
-      /* Use mpfr_snprintf rounding to compute the smallest
-	 representable decimal number greater or equal than
-	 1 << (prec - !uns_p).  */
-      mpfr_init2 (m, prec + 2);
-      mpfr_set_ui_2exp (m, 1, prec - !uns_p, GMP_RNDN);
-      mpfr_snprintf (buf, sizeof buf, "%.*RUe", p - 1, m);
-      decimal_real_from_string (&maxval, buf);
-      max = build_real (expr_type, maxval);
-
-      /* For unsigned, assume -1.0 is always representable.  */
-      if (uns_p)
-	min = build_minus_one_cst (expr_type);
-      else
-	{
-	  /* Use mpfr_snprintf rounding to compute the largest
-	     representable decimal number less or equal than
-	     (-1 << (prec - 1)) - 1.  */
-	  mpfr_set_si_2exp (m, -1, prec - 1, GMP_RNDN);
-	  mpfr_sub_ui (m, m, 1, GMP_RNDN);
-	  mpfr_snprintf (buf, sizeof buf, "%.*RDe", p - 1, m);
-	  decimal_real_from_string (&minval, buf);
-	  min = build_real (expr_type, minval);
-	}
-      mpfr_clear (m);
-    }
   else
     return NULL_TREE;