aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/bitfield-preinc.c
blob: 783327ae8a2ad6275a5311ce0e0e3e3c84e79514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct s {
	int f:3;
};

int preinc(void)
{
	struct s s = { 7 };
	return ++s.f;
}

/*
 * check-name: bitfield-preinc
 * check-description: ++X is equivalent to X+=1
 * check-command: test-linearize -Wno-decl $file
 *
 * check-output-ignore
 * check-output-contains: ret.32 *\\$0
 */