On Thu, Nov 01, 2018 at 01:09:16PM +0100, Martin Liška wrote:
> -range 0.0 to 1.0, inclusive.
> +range 0.0 to 1.0, inclusive. The @var{probability} argument must be
> +a compiler time constant.
When you say must, I think error_at should be used rather than warning_at.
If others disagree I'm open for leaving it as is.
> @@ -2474,6 +2481,11 @@ expr_expected_value_1 (tree type, tree op0, enum
> tree_code code,
> *predictor = PRED_BUILTIN_EXPECT_WITH_PROBABILITY;
> *probability = probi;
> }
> + else
> + warning_at (gimple_location (def), 0,
> + "probability argument %qE must be a in the "
> + "range 0.0 to 1.0", prob);
Wrong indentation.
And, no diagnostics for -O0 (which should also be covered by a testcase).
> +/* { dg-options "-O2 -fdump-tree-profile_estimate -frounding-math" } */
Why the -frounding-math options? I think test
coverage should handle both that and when that option is not used
if that option makes any difference.
Jakub