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