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.dg/] [guality/] [pr43329-1.c] - Rev 298
Compare with Previous | Blame | View Log
/* PR debug/43329 */ /* { dg-do run } */ /* { dg-options "-g" } */ static inline void foo (int argx) { int varx = argx; __asm__ volatile ("nop"); /* { dg-final { gdb-test 10 "argx" "25" } } */ __asm__ volatile ("nop" : : "g" (varx)); /* { dg-final { gdb-test 10 "varx" "25" } } */ } int i; __attribute__((noinline)) void baz (int x) { asm volatile ("" : : "r" (x) : "memory"); } static inline void bar (void) { foo (25); i = i + 2; i = i * 2; i = i - 4; baz (i); i = i * 2; i = i >> 1; i = i << 6; baz (i); i = i + 2; i = i * 2; i = i - 4; baz (i); i = i * 2; i = i >> 6; i = i << 1; baz (i); } int main (void) { __asm__ volatile ("" : "=r" (i) : "0" (0)); bar (); bar (); return i; }