]> git.proxmox.com Git - rustc.git/blob - src/llvm/tools/clang/test/CodeGen/bool-bitfield.c
Imported Upstream version 0.6
[rustc.git] / src / llvm / tools / clang / test / CodeGen / bool-bitfield.c
1 // RUN: %clang_cc1 -emit-llvm %s -o %t
2
3 // From GCC PR19331
4 struct SysParams
5 {
6 unsigned short tag;
7 unsigned short version;
8 unsigned int seqnum;
9 int contrast;
10 int igain_1, igain_2;
11 int oattn_1, oattn_2;
12 int max_out_vltg_1, max_out_vltg_2;
13 int max_mains_current;
14 int meters_mode;
15 int input_select;
16 _Bool input_parallelch2:1;
17 _Bool cliplmt_ch1:1;
18 _Bool cliplmt_ch2:1;
19 _Bool gate_ch1:1;
20 _Bool gate_ch2:1;
21 _Bool mute_ch1:1;
22 _Bool mute_ch2:1;
23 _Bool brownout:1;
24 _Bool power_on:1;
25 _Bool pwrup_mute:1;
26 _Bool keylock:1;
27 _Bool dsp_ch1:1;
28 _Bool dsp_ch2:1;
29 int dsp_preset;
30 long unlock_code;
31 };
32 extern struct SysParams params;
33
34 void foo(void *);
35 void kcmd_setParams(void)
36 {
37 struct {
38 unsigned char igain_1;
39 unsigned char igain_2;
40 unsigned char max_out_vltg_1;
41 unsigned char max_out_vltg_2;
42 unsigned char max_imains;
43 unsigned char cliplmt_ch1:1;
44 unsigned char cliplmt_ch2:1;
45 unsigned char gate_ch1:1;
46 unsigned char gate_ch2:1;
47 } msg;
48 foo(&msg);
49 params.cliplmt_ch1 = msg.cliplmt_ch1;
50 params.cliplmt_ch2 = msg.cliplmt_ch2;
51 params.gate_ch1 = msg.gate_ch1;
52 params.gate_ch2 = msg.gate_ch2;
53 }
54