2 20050826-2.c from the execute part of the gcc torture suite.
11 #pragma disable_warning 85
13 /* PR rtl-optimization/23560 */
17 unsigned short rta_len
;
18 unsigned short rta_type
;
21 int inet_check_attr (void *r
, struct rtattr
**rta
)
25 for (i
= 1; i
<= 14; i
++)
27 struct rtattr
*attr
= rta
[i
- 1];
30 if (attr
->rta_len
- sizeof (struct rtattr
) < 4)
33 rta
[i
- 1] = attr
+ 1;
40 testTortureExecute (void)
42 #if !defined(__SDCC_pdk14) // Lack of memory
44 struct rtattr
*rta
[14];
47 rt
[0].rta_len
= sizeof (struct rtattr
) + 8;
50 for (i
= 0; i
< 14; i
++)
52 if (inet_check_attr (0, rta
) != 0)
54 for (i
= 0; i
< 14; i
++)
55 if (rta
[i
] != &rt
[i
!= 7 && i
!= 8])
57 for (i
= 0; i
< 14; i
++)
62 if (inet_check_attr (0, rta
) != -22)
64 for (i
= 0; i
< 14; i
++)
65 if (i
== 1 && rta
[i
] != 0)
67 else if (i
!= 1 && i
<= 5 && rta
[i
] != &rt
[1])
69 else if (i
> 5 && rta
[i
] != &rt
[0])