Change wording of __builtin_expect_with_probability errors.
2018-11-08 Martin Liska <mliska@suse.cz> * doc/extend.texi: Reword. * predict.c (expr_expected_value_1): Likewise. 2018-11-08 Martin Liska <mliska@suse.cz> * gcc.dg/pr87811.c: Update scanned pattern. * gcc.dg/pr87811-2.c: Likewise. From-SVN: r265911
This commit is contained in:
parent
f1f5b884c8
commit
c4e7e1b9f7
@ -1,3 +1,8 @@
|
||||
2018-11-08 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* doc/extend.texi: Reword.
|
||||
* predict.c (expr_expected_value_1): Likewise.
|
||||
|
||||
2018-11-08 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/87913
|
||||
|
@ -12047,7 +12047,7 @@ This function has the same semantics as @code{__builtin_expect},
|
||||
but the caller provides the expected probability that @var{exp} == @var{c}.
|
||||
The last argument, @var{probability}, is a floating-point value in the
|
||||
range 0.0 to 1.0, inclusive. The @var{probability} argument must be
|
||||
a compiler time constant.
|
||||
constant floating-point expression.
|
||||
@end deftypefn
|
||||
|
||||
@deftypefn {Built-in Function} void __builtin_trap (void)
|
||||
|
@ -2470,8 +2470,8 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code,
|
||||
if (TREE_CODE (r) != REAL_CST)
|
||||
{
|
||||
error_at (gimple_location (def),
|
||||
"probability argument %qE must be a compile "
|
||||
"time constant", prob);
|
||||
"probability %qE must be "
|
||||
"constant floating-point expression", prob);
|
||||
return NULL;
|
||||
}
|
||||
HOST_WIDE_INT probi
|
||||
@ -2483,8 +2483,8 @@ expr_expected_value_1 (tree type, tree op0, enum tree_code code,
|
||||
}
|
||||
else
|
||||
error_at (gimple_location (def),
|
||||
"probability argument %qE must be a in the "
|
||||
"range 0.0 to 1.0", prob);
|
||||
"probability %qE is outside "
|
||||
"the range [0.0, 1.0]", prob);
|
||||
|
||||
return gimple_call_arg (def, 1);
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-11-08 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* gcc.dg/pr87811.c: Update scanned pattern.
|
||||
* gcc.dg/pr87811-2.c: Likewise.
|
||||
|
||||
2018-11-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* g++.dg/lto/pr87906_0.C: Use moon instead of possibly predefined
|
||||
|
@ -6,7 +6,7 @@ void bar (void);
|
||||
void
|
||||
foo (int i)
|
||||
{
|
||||
if (__builtin_expect_with_probability (i, 0, 2.0f)) /* { dg-error "probability argument .* must be a in the range 0\\\.0 to 1\\\.0" } */
|
||||
if (__builtin_expect_with_probability (i, 0, 2.0f)) /* { dg-error "probability .* is outside the range \\\[0\\\.0, 1\\\.0\\\]" } */
|
||||
bar ();
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ void bar (void);
|
||||
void
|
||||
foo (int i, double d)
|
||||
{
|
||||
if (__builtin_expect_with_probability (i, 0, d)) /* { dg-error "probability argument .d. must be a compile time constant" } */
|
||||
if (__builtin_expect_with_probability (i, 0, d)) /* { dg-error "probability .d. must be constant floating-point expression" } */
|
||||
bar ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user