1f08c3bdfSopenharmony_ciint foo(int a, int b)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_ci	int var = 0;
4f08c3bdfSopenharmony_ci	int r;
5f08c3bdfSopenharmony_ci
6f08c3bdfSopenharmony_ci	if (a)
7f08c3bdfSopenharmony_ci		var = 1;
8f08c3bdfSopenharmony_ci	if (b)
9f08c3bdfSopenharmony_ci		r = var;
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ci	return r;		// undef if !b
12f08c3bdfSopenharmony_ci}
13f08c3bdfSopenharmony_ci
14f08c3bdfSopenharmony_ci/*
15f08c3bdfSopenharmony_ci * check-name: variable partially undefined
16f08c3bdfSopenharmony_ci * check-description: trigger a bug in symbol/memop simplification
17f08c3bdfSopenharmony_ci * check-description: sparse-llvm is used here as semantic checker of sparse's IR
18f08c3bdfSopenharmony_ci * check-command: sparse-llvm -Wno-decl $file
19f08c3bdfSopenharmony_ci * check-output-ignore
20f08c3bdfSopenharmony_ci */
21