2017-02-17 Martin Liska <mliska@suse.cz>
PR rtl-optimization/79574
* gcc.dg/pr79574.c: New test.
2017-02-17 Martin Liska <mliska@suse.cz>
PR rtl-optimization/79574
* gcse.c (want_to_gcse_p): Prevent integer overflow.
From-SVN: r245531
+2017-02-17 Martin Liska <mliska@suse.cz>
+
+ PR rtl-optimization/79574
+ * gcse.c (want_to_gcse_p): Prevent integer overflow.
+
2017-02-17 Martin Liska <mliska@suse.cz>
PR tree-optimization/79529
/* PRE doesn't implement max_distance restriction. */
{
int cost;
- int max_distance;
+ HOST_WIDE_INT max_distance;
gcc_assert (!optimize_function_for_speed_p (cfun)
&& optimize_function_for_size_p (cfun));
if (cost < COSTS_N_INSNS (GCSE_UNRESTRICTED_COST))
{
- max_distance = (GCSE_COST_DISTANCE_RATIO * cost) / 10;
+ max_distance
+ = ((HOST_WIDE_INT)GCSE_COST_DISTANCE_RATIO * cost) / 10;
if (max_distance == 0)
return 0;
+2017-02-17 Martin Liska <mliska@suse.cz>
+
+ PR rtl-optimization/79574
+ * gcc.dg/pr79574.c: New test.
+
2017-02-17 Marek Polacek <polacek@redhat.com>
PR middle-end/79536
--- /dev/null
+/* PR rtl-optimization/79574 */
+/* { dg-do compile } */
+/* { dg-options "-Os --param gcse-cost-distance-ratio=2147483647" } */
+
+void a (void)
+{
+ volatile int b;
+ for (;; b)
+ ;
+}