From 4720f4afbae879f6cc73a420f7c2943a5cba70ec Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Wed, 15 Aug 2018 04:09:45 +0000 Subject: [PATCH] re PR target/86547 (s390x: Maximum number of LRA assignment passes is achieved (30) when compiling a small inline assembler snippet) PR target/86547 * lra-lives.c (remove_some_program_points_and_update_live_ranges): Check whether lra_live_max_point is 0 before dividing. From-SVN: r263548 --- gcc/ChangeLog | 6 ++++++ gcc/lra-lives.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 97ea6bcdaa0..84f81f6c898 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-08-14 Ilya Leoshkevich + + PR target/86547 + * lra-lives.c (remove_some_program_points_and_update_live_ranges): + Check whether lra_live_max_point is 0 before dividing. + 2018-08-14 Martin Sebor PR tree-optimization/86650 diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c index 433c819d9e3..565c68b430a 100644 --- a/gcc/lra-lives.c +++ b/gcc/lra-lives.c @@ -1153,7 +1153,8 @@ remove_some_program_points_and_update_live_ranges (void) n++; if (lra_dump_file != NULL) fprintf (lra_dump_file, "Compressing live ranges: from %d to %d - %d%%\n", - lra_live_max_point, n, 100 * n / lra_live_max_point); + lra_live_max_point, n, + lra_live_max_point ? 100 * n / lra_live_max_point : 100); if (n < lra_live_max_point) { lra_live_max_point = n; -- 2.30.2