URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20080122-1.c] - Rev 378
Go to most recent revision | Compare with Previous | Blame | View Log
/* PR rtl-optimization/34628 */ /* Origin: Martin Michlmayr <tbm@cyrius.com> */ typedef unsigned short u16; typedef unsigned char u8; static void do_segfault(u8 in_buf[], const u8 out_buf[], const int len) { int i; for (i = 0; i < len; i++) { asm(""); in_buf[2*i] = ( out_buf[2*i] | out_buf[(2*i)+1]<<8 ) & 0xFF; asm(""); in_buf[(2*i)+1] = ( out_buf[2*i] | out_buf[(2*i)+1]<<8 ) >> 8; asm(""); } } int main(int argc, char *argv[]) { u8 outbuf[32] = "buffer "; u8 inbuf[32] = "\f"; asm(""); do_segfault(inbuf, outbuf, 12); asm(""); return 0; }
Go to most recent revision | Compare with Previous | Blame | View Log