gcc/testsuite/gcc.dg/pr87811-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-profile_estimate" } */ |
| 3 | |
| 4 | void bar (void); |
| 5 | |
| 6 | void |
| 7 | foo (int i) |
| 8 | { |
| 9 | if (__builtin_expect_with_probability (i, 0, 2.0f)) /* { dg-error "probability .* is outside the range \\\[0\\\.0, 1\\\.0\\\]" } */ |
| 10 | bar (); |
| 11 | } |
| 12 | |
| 13 | /* { dg-final { scan-tree-dump-not "__builtin_expect_with_probability heuristics of edge" "profile_estimate"} } */ |