expressions: make assign_expression() take an op argument
[smatch.git] / validation / bitfield-size.c
blobce78ecf2173ba49e158e23148e742e43c7b92a71
1 struct bfu {
2 unsigned int a:4;
3 unsigned int :2;
4 unsigned int b:4;
5 };
6 unsigned int get__bfu_a(struct bfu bf) { return bf.a; }
7 unsigned int get__bfu_b(struct bfu bf) { return bf.b; }
8 unsigned int get_pbfu_a(struct bfu *bf) { return bf->a; }
9 unsigned int get_pbfu_b(struct bfu *bf) { return bf->b; }
12 struct bfs {
13 signed int a:4;
14 signed int :2;
15 signed int b:4;
17 signed int get__bfs_a(struct bfs bf) { return bf.a; }
18 signed int get__bfs_b(struct bfs bf) { return bf.b; }
19 signed int get_pbfs_a(struct bfs *bf) { return bf->a; }
20 signed int get_pbfs_b(struct bfs *bf) { return bf->b; }
23 struct bfi {
24 int a:4;
25 int :2;
26 int b:4;
28 unsigned int get__bfi_a(struct bfi bf) { return bf.a; }
29 unsigned int get__bfi_b(struct bfi bf) { return bf.b; }
30 unsigned int get_pbfi_a(struct bfi *bf) { return bf->a; }
31 unsigned int get_pbfi_b(struct bfi *bf) { return bf->b; }
34 * check-name: bitfield size
35 * check-command: test-linearize -Wno-decl $file
36 * check-output-ignore
38 * check-output-pattern-24-times: cast\\.
39 * check-output-pattern-12-times: cast\\.4
40 * check-output-pattern-6-times: lsr\\..*\\$6