Verify that last argument of __builtin_expect_with_probability is a real cst (PR...
authorMartin Liska <mliska@suse.cz>
Mon, 5 Nov 2018 07:33:30 +0000 (08:33 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 5 Nov 2018 07:33:30 +0000 (07:33 +0000)
commitc3210c96bc56fec2653206e49c4a2514a8c7535f
treecb481eda21cffb659bf7625a625ed074a6a40273
parente53f77c666d6806c2e8c288ca1affa1497453e57
Verify that last argument of __builtin_expect_with_probability is a real cst (PR c/87811).

2018-11-05  Martin Liska  <mliska@suse.cz>

PR c/87811
* predict.c (expr_expected_value_1): Verify
that last argument is a real constants and emit
error.
2018-11-05  Martin Liska  <mliska@suse.cz>

PR c/87811
* gcc.dg/pr87811.c: New test.
* gcc.dg/pr87811-2.c: Likewise.
* gcc.dg/pr87811-3.c: Likewise.
2018-11-05  Martin Liska  <mliska@suse.cz>

PR c/87811
* doc/extend.texi: Update constrain about the last argument
of __builtin_expect_with_probability.

From-SVN: r265785
gcc/ChangeLog
gcc/doc/extend.texi
gcc/predict.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr87811-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr87811-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr87811.c [new file with mode: 0644]