Merge from mainline
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr25706-1.c
blob49bb32722f9bfc812e5bd2fa28527e82dff20e33
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;
9 void tcp_init_buffer_space(struct tcp_opt *tp, int maxwin)
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 });
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 });