xref: /illumos-gate/usr/src/tools/smatch/src/validation/linear/bitfield-preinc.c (revision 1edba515a3484e0f74b638b203d462b3112ac84d)
1 struct s {
2 	int f:3;
3 };
4 
5 int preinc(void)
6 {
7 	struct s s = { 7 };
8 	return ++s.f;
9 }
10 
11 /*
12  * check-name: bitfield-preinc
13  * check-description: ++X is equivalent to X+=1
14  * check-command: test-linearize -Wno-decl $file
15  *
16  * check-output-ignore
17  * check-output-contains: ret.32 *\\$0
18  */
19