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/] [20061220-1.c] - Rev 378
Go to most recent revision | Compare with Previous | Blame | View Log
/* PR middle-end/30262 */ extern void abort (void); int foo (void) { unsigned int x = 0; void nested (void) { x = 254; } nested (); asm volatile ("" :: "r" (x)); asm volatile ("" :: "m" (x)); asm volatile ("" :: "mr" (x)); asm volatile ("" : "=r" (x) : "0" (x)); asm volatile ("" : "=m" (x) : "m" (x)); return x; } int bar (void) { unsigned int x = 0; void nested (void) { asm volatile ("" :: "r" (x)); asm volatile ("" :: "m" (x)); asm volatile ("" :: "mr" (x)); x += 4; asm volatile ("" : "=r" (x) : "0" (x)); asm volatile ("" : "=m" (x) : "m" (x)); } nested (); return x; } int baz (void) { unsigned int x = 0; void nested (void) { void nested2 (void) { asm volatile ("" :: "r" (x)); asm volatile ("" :: "m" (x)); asm volatile ("" :: "mr" (x)); x += 4; asm volatile ("" : "=r" (x) : "0" (x)); asm volatile ("" : "=m" (x) : "m" (x)); } nested2 (); nested2 (); } nested (); return x; } int main (void) { if (foo () != 254 || bar () != 4 || baz () != 8) abort (); return 0; }
Go to most recent revision | Compare with Previous | Blame | View Log