1 /* PR rtl-optimization/34628 */
2 /* Origin: Martin Michlmayr <tbm@cyrius.com> */
4 typedef unsigned short u16
;
5 typedef unsigned char u8
;
8 do_segfault(u8 in_buf
[], const u8 out_buf
[], const int len
)
12 for (i
= 0; i
< len
; i
++) {
15 in_buf
[2*i
] = ( out_buf
[2*i
] | out_buf
[(2*i
)+1]<<8 ) & 0xFF;
19 in_buf
[(2*i
)+1] = ( out_buf
[2*i
] | out_buf
[(2*i
)+1]<<8 ) >> 8;
25 int main(int argc
, char *argv
[])
27 u8 outbuf
[32] = "buffer ";
31 do_segfault(inbuf
, outbuf
, 12);