1*1f5207b7SJohn Levon struct foo {
2*1f5207b7SJohn Levon 	unsigned int x:1;
3*1f5207b7SJohn Levon };
4*1f5207b7SJohn Levon 
5*1f5207b7SJohn Levon int frob();
6*1f5207b7SJohn Levon int a,b,c,d, x, y;
7*1f5207b7SJohn Levon struct foo *z;
options_write(void)8*1f5207b7SJohn Levon static int options_write(void)
9*1f5207b7SJohn Levon {
10*1f5207b7SJohn Levon 	if (x & y == 0)
11*1f5207b7SJohn Levon 		frob();
12*1f5207b7SJohn Levon 	if (x | y == 0)
13*1f5207b7SJohn Levon 		frob();
14*1f5207b7SJohn Levon 	if (a == b & c == d)
15*1f5207b7SJohn Levon 		frob();
16*1f5207b7SJohn Levon 	if (a == c == d)
17*1f5207b7SJohn Levon 		frob();
18*1f5207b7SJohn Levon 	if (!a == b)
19*1f5207b7SJohn Levon 		frob();
20*1f5207b7SJohn Levon 	c = !a & b;
21*1f5207b7SJohn Levon 	if (x + y == 0)
22*1f5207b7SJohn Levon 		frob();
23*1f5207b7SJohn Levon 	if (!a == !b)
24*1f5207b7SJohn Levon 		frob();
25*1f5207b7SJohn Levon 	if (!a == z->x)
26*1f5207b7SJohn Levon 		frob();
27*1f5207b7SJohn Levon 	if (!!a == b)
28*1f5207b7SJohn Levon 		frob();
29*1f5207b7SJohn Levon 
30*1f5207b7SJohn Levon }
31*1f5207b7SJohn Levon /*
32*1f5207b7SJohn Levon  * check-name: Smatch precedence check
33*1f5207b7SJohn Levon  * check-command: smatch sm_precedence.c
34*1f5207b7SJohn Levon  *
35*1f5207b7SJohn Levon  * check-output-start
36*1f5207b7SJohn Levon sm_precedence.c:10 options_write() warn: add some parenthesis here?
37*1f5207b7SJohn Levon sm_precedence.c:12 options_write() warn: add some parenthesis here?
38*1f5207b7SJohn Levon sm_precedence.c:14 options_write() warn: add some parenthesis here?
39*1f5207b7SJohn Levon sm_precedence.c:16 options_write() warn: add some parenthesis here?
40*1f5207b7SJohn Levon sm_precedence.c:18 options_write() warn: add some parenthesis here?
41*1f5207b7SJohn Levon sm_precedence.c:20 options_write() warn: add some parenthesis here?
42*1f5207b7SJohn Levon  * check-output-end
43*1f5207b7SJohn Levon  */
44