1f08c3bdfSopenharmony_ciextern int error(int);
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_ciint foo(int perr);
4f08c3bdfSopenharmony_ciint foo(int perr)
5f08c3bdfSopenharmony_ci{
6f08c3bdfSopenharmony_ci	int err = 0;
7f08c3bdfSopenharmony_ci	int rc = 0;
8f08c3bdfSopenharmony_ci	int j = 0;
9f08c3bdfSopenharmony_ci	int i = 1;
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ci	i && j++;
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_ci	i-- && j;
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_ci	i && j--;
16f08c3bdfSopenharmony_ci
17f08c3bdfSopenharmony_ci	if (j != 1) {
18f08c3bdfSopenharmony_ci		err = 1;
19f08c3bdfSopenharmony_ci		if (perr)
20f08c3bdfSopenharmony_ci			error(1);
21f08c3bdfSopenharmony_ci	}
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ci	if (err != 0)
24f08c3bdfSopenharmony_ci		rc = 1;
25f08c3bdfSopenharmony_ci
26f08c3bdfSopenharmony_ci	return rc;
27f08c3bdfSopenharmony_ci}
28f08c3bdfSopenharmony_ci
29f08c3bdfSopenharmony_ci/*
30f08c3bdfSopenharmony_ci * check-name: kill-phi-ttsbb2
31f08c3bdfSopenharmony_ci * check-description:
32f08c3bdfSopenharmony_ci *	Verify if OP_PHI usage is adjusted after successful try_to_simplify_bb()
33f08c3bdfSopenharmony_ci * check-warning: this test is sensitive to details of code generation
34f08c3bdfSopenharmony_ci *                with proper bb packing (taking care of phi-nodes) it
35f08c3bdfSopenharmony_ci *		  will be optimized away and test nothing. You have been warned.
36f08c3bdfSopenharmony_ci * check-command: test-linearize $file
37f08c3bdfSopenharmony_ci * check-output-ignore
38f08c3bdfSopenharmony_ci *
39f08c3bdfSopenharmony_ci * check-output-excludes: VOID
40f08c3bdfSopenharmony_ci */
41