aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr103680.c
blob: 30599fc1ef2e1975dcc5d51530f1c45dd7e1a5ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-optimized-details-blocks -fno-early-inlining" } */
void foo ();
static void
test (int i)
{
	if (__builtin_expect_with_probability (i > 5, 1, 0.6))
		foo ();
}
void
test2(int i)
{
	test (i);
	if (__builtin_expect_with_probability (i > 4, 1, 0.7))
		foo ();
}
/* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } }  */