db/insert_manual_states.pl: remove debug output
[smatch.git] / validation / optim / bitfield-init-zero.c
blobe619d1d25d03722500010439489d9c7bfb541943
1 struct bfu {
2 unsigned int a:11;
3 unsigned int f:9;
4 unsigned int :2;
5 unsigned int z:3;
6 };
8 struct bfu bfuu_init(unsigned int a)
10 struct bfu bf = { .f = a, };
11 return bf;
14 struct bfu bfus_init(int a)
16 struct bfu bf = { .f = a, };
17 return bf;
20 unsigned int bfu_get0(void)
22 struct bfu bf = { };
23 return bf.f;
27 struct bfs {
28 signed int a:11;
29 signed int f:9;
30 signed int :2;
31 signed int z:3;
34 struct bfs bfsu_init(unsigned int a)
36 struct bfs bf = { .f = a, };
37 return bf;
40 struct bfs bfss_init(int a)
42 struct bfs bf = { .f = a, };
43 return bf;
46 int bfs_get0(void)
48 struct bfs bf = { };
49 return bf.f;
53 * check-name: bitfield implicit init zero
54 * check-command: test-linearize -Wno-decl $file
56 * check-output-start
57 bfuu_init:
58 .L0:
59 <entry-point>
60 and.32 %r4 <- %arg1, $511
61 shl.32 %r5 <- %r4, $11
62 ret.32 %r5
65 bfus_init:
66 .L2:
67 <entry-point>
68 and.32 %r13 <- %arg1, $511
69 shl.32 %r14 <- %r13, $11
70 ret.32 %r14
73 bfu_get0:
74 .L4:
75 <entry-point>
76 ret.32 $0
79 bfsu_init:
80 .L6:
81 <entry-point>
82 and.32 %r27 <- %arg1, $511
83 shl.32 %r28 <- %r27, $11
84 ret.32 %r28
87 bfss_init:
88 .L8:
89 <entry-point>
90 and.32 %r36 <- %arg1, $511
91 shl.32 %r37 <- %r36, $11
92 ret.32 %r37
95 bfs_get0:
96 .L10:
97 <entry-point>
98 ret.32 $0
101 * check-output-end