aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/mem2reg/if-pointer.c
blob: acfceb718c64f8ab361813cd11d21503f83b907d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
int foo(int c, int a, int b)
{
	int l, *p = &l;

	if (c)
		*p = a;
	else
		*p = b;

	return l + *p;
}

/*
 * check-name: if-then-else pointer
 * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
 * check-known-to-fail
 * check-output-ignore
 * check-output-excludes: load\\.
 * check-output-excludes: store\\.
 * check-output-contains: phi\\.
 */