1 /* { dg-do assemble } */ 2 /* Invalid assembly generated due to port bug. */ 3 struct tcp_opt { 4 unsigned int window_clamp; 5 unsigned int rcv_ssthresh; 6 unsigned short advmss; 7 }; 8 extern int sysctl_tcp_app_win; tcp_init_buffer_space(struct tcp_opt * tp,int maxwin)9void tcp_init_buffer_space(struct tcp_opt *tp, int maxwin) 10 { 11 if (tp->window_clamp >= maxwin) 12 if (sysctl_tcp_app_win && maxwin>4*tp->advmss) 13 tp->window_clamp 14 = ({ 15 int _x = maxwin; 16 typeof(4*tp->advmss) _y = (4*tp->advmss); 17 _x > _y ? _x : _y; 18 }); 19 20 if (sysctl_tcp_app_win 21 && tp->window_clamp > 2*tp->advmss 22 && tp->window_clamp + tp->advmss > maxwin) 23 tp->window_clamp 24 = ({ 25 unsigned short _x = maxwin; 26 unsigned short _y = (maxwin-tp->advmss); 27 _x > _y ? _x : _y; 28 }); 29 tp->rcv_ssthresh 30 = ({ 31 unsigned int _x = (tp->rcv_ssthresh); 32 unsigned int _y = (tp->window_clamp); 33 _x < _y ? _x : _y; 34 }); 35 } 36