File: kill-phi-ttsbb2.c

package info (click to toggle)
sparse 0.6.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,868 kB
  • sloc: ansic: 46,050; sh: 614; python: 301; perl: 293; makefile: 279
file content (40 lines) | stat: -rw-r--r-- 690 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
extern int error(int);

int foo(int perr);
int foo(int perr)
{
	int err = 0;
	int rc = 0;
	int j = 0;
	int i = 1;

	i && j++;

	i-- && j;

	i && j--;

	if (j != 1) {
		err = 1;
		if (perr)
			error(1);
	}

	if (err != 0)
		rc = 1;

	return rc;
}

/*
 * check-name: kill-phi-ttsbb2
 * check-description:
 *	Verify if OP_PHI usage is adjusted after successful try_to_simplify_bb()
 * check-warning: this test is sensitive to details of code generation
 *                with proper bb packing (taking care of phi-nodes) it
 *		  will be optimized away and test nothing. You have been warned.
 * check-command: test-linearize $file
 * check-output-ignore
 *
 * check-output-excludes: VOID
 */