PR middle-end/89415
* toplev.c (do_compile): Double the emin/emax exponents to workaround
buggy mpc_norm.
* gcc.dg/pr88074-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269055
138bc75d-0d04-0410-961f-
82ee72b054a4
+2019-02-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/88074
+ PR middle-end/89415
+ * toplev.c (do_compile): Double the emin/emax exponents to workaround
+ buggy mpc_norm.
+
2019-02-20 Uroš Bizjak <ubizjak@gmail.com>
PR target/89397
2019-02-20 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/88074
+ PR middle-end/89415
+ * gcc.dg/pr88074-2.c: New test.
+
PR c++/89336
* g++.dg/cpp1y/constexpr-89336-3.C: New test.
--- /dev/null
+/* PR middle-end/88074 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-add-options float128 } */
+/* { dg-require-effective-target float128 } */
+/* { dg-final { scan-tree-dump-not "link_error " "optimized" } } */
+
+extern void link_error (void);
+int
+main ()
+{
+ if (((__FLT128_MAX__ * 0.5 + __FLT128_MAX__ * 0.5i)
+ / (__FLT128_MAX__ * 0.25 + __FLT128_MAX__ * 0.25i))
+ != (_Complex _Float128) 2)
+ link_error ();
+ return 0;
+}
max_exp = fmt->emax;
}
}
- if (mpfr_set_emin (min_exp)
- || mpfr_set_emax (max_exp))
+ /* E.g. mpc_norm assumes it can square a number without bothering with
+ with range scaling, so until that is fixed, double the minimum
+ and maximum exponents, plus add some buffer for arithmetics
+ on the squared numbers. */
+ if (mpfr_set_emin (2 * (min_exp - 1))
+ || mpfr_set_emax (2 * (max_exp + 1)))
sorry ("mpfr not configured to handle all float modes");
/* Set up the back-end if requested. */