Hello. Following patch just changes minimum value to 1. I think having minimum to zero does not make any good sense.
Running reg&bootstrap on x86_64-linux-gnu, ready after it finishes? Thanks, Martin
>From c677c2bdc0f011dbda013dd396431b3afcbc2ae9 Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Wed, 22 Jun 2016 14:03:25 +0200 Subject: [PATCH] Change minimum of -predicted-iterations to 1 (PR71619) gcc/testsuite/ChangeLog: 2016-06-22 Martin Liska <mli...@suse.cz> * gcc.dg/tree-ssa/pr71619.c: New test. gcc/ChangeLog: 2016-06-22 Martin Liska <mli...@suse.cz> PR middle-end/71619 * params.def: Set minimum value of max-predicted-iterations to 1. --- gcc/params.def | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr71619.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr71619.c diff --git a/gcc/params.def b/gcc/params.def index 894b7f3..d85c5db 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -422,7 +422,7 @@ DEFPARAM (PARAM_ALIGN_LOOP_ITERATIONS, DEFPARAM(PARAM_MAX_PREDICTED_ITERATIONS, "max-predicted-iterations", "The maximum number of loop iterations we predict statically.", - 100, 0, 0) + 100, 1, 0) /* This parameter controls the probability of builtin_expect. The default value is 90%. This empirical value is obtained through the weighted diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr71619.c b/gcc/testsuite/gcc.dg/tree-ssa/pr71619.c new file mode 100644 index 0000000..1e9b3a7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr71619.c @@ -0,0 +1,12 @@ +/* PR 71619 */ + +/* { dg-do compile } */ +/* { dg-options "-O --param=max-predicted-iterations=0" } */ +/* { dg-error "minimum value of parameter 'max-predicted-iterations' is 1" "" { target *-*-* } 0 } */ + +void +foo () +{ + int count = -10; + while (count++); +} -- 2.8.4