+2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
+
+ PR rtl-optimization/57676
+ * lra-assigns.c (lra_assign): Guard test for maximum iterations
+ with flag_checking.
+
2016-03-04 Ilya Enkovich <enkovich.gnu@gmail.com>
* tree-vect-patterns.c (search_type_for_mask): Handle
comparison of booleans.
-
2016-03-04 Jakub Jelinek <jakub@redhat.com>
* doc/extend.texi (__builtin_alloca, __builtin_alloca_with_align):
timevar_pop (TV_LRA_ASSIGN);
if (former_reload_pseudo_spill_p)
lra_assignment_iter_after_spill++;
- if (lra_assignment_iter_after_spill > LRA_MAX_ASSIGNMENT_ITERATION_NUMBER)
+ /* This is conditional on flag_checking because valid code can take
+ more than this maximum number of iteration, but at the same time
+ the test can uncover errors in machine descriptions. */
+ if (flag_checking
+ && (lra_assignment_iter_after_spill
+ > LRA_MAX_ASSIGNMENT_ITERATION_NUMBER))
internal_error
("Maximum number of LRA assignment passes is achieved (%d)\n",
LRA_MAX_ASSIGNMENT_ITERATION_NUMBER);
+2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
+
+ PR rtl-optimization/57676
+ * gcc.dg/torture/pr57676.c: New test.
+
2016-03-04 Ilya Enkovich <enkovich.gnu@gmail.com>
* gcc.dg/pr70026.c: New test.
--- /dev/null
+/* Verify that LRA does not abort prematurely in a release build of the
+ compiler. */
+/* { dg-do compile } */
+/* { dg-options "-fno-checking -w -funroll-loops" } */
+
+int a, b, c;
+
+void f(p1)
+{
+ for(;;)
+ {
+ if(p1 ? : (c /= 0))
+ {
+ int d;
+
+ for(; d; d++)
+ {
+ for(b = 0; b < 4; b++)
+ p1 /= p1;
+lbl:
+ while(a);
+ }
+ }
+
+ if((c &= 1))
+ goto lbl;
+ }
+}