Commit 249700b5 by Richard Biener Committed by Richard Biener

re PR tree-optimization/64295 (ICE: SIGSEGV (infinite recursion) with…

re PR tree-optimization/64295 (ICE: SIGSEGV (infinite recursion) with -frounding-math -funsafe-math-optimizations)

2014-12-15  Richard Biener  <rguenther@suse.de>

	PR middle-end/64295
	* match.pd (X / CST -> X * (1 / CST): Use const_binop instead of
	fold_binary to compute the constant to multiply with.

	* gcc.dg/pr64295.c: New testcase.

From-SVN: r218748
parent 024660c5
2014-12-15 Richard Biener <rguenther@suse.de>
PR middle-end/64295
* match.pd (X / CST -> X * (1 / CST): Use const_binop instead of
fold_binary to compute the constant to multiply with.
2014-12-15 Richard Biener <rguenther@suse.de>
PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.
......@@ -186,7 +186,7 @@ along with GCC; see the file COPYING3. If not see
(if (flag_reciprocal_math
&& !real_zerop (@1))
(with
{ tree tem = fold_binary (RDIV_EXPR, type, build_one_cst (type), @1); }
{ tree tem = const_binop (RDIV_EXPR, type, build_one_cst (type), @1); }
(if (tem)
(mult @0 { tem; } ))))
(if (cst != COMPLEX_CST)
......
2014-12-15 Richard Biener <rguenther@suse.de>
PR middle-end/64295
* gcc.dg/pr64295.c: New testcase.
2014-12-15 Richard Biener <rguenther@suse.de>
PR middle-end/64246
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
......
/* { dg-do compile } */
/* { dg-options "-O -frounding-math -funsafe-math-optimizations" } */
double
f (double g)
{
return g / 3;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment