URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [pr43329-1.c] - Rev 774
Go to most recent revision | Compare with Previous | Blame | View Log
/* PR debug/43329 */ /* { dg-do run } */ /* { dg-options "-g" } */ #include "../nop.h" static inline void foo (int argx) { int varx = argx; __asm__ volatile (NOP); /* { dg-final { gdb-test 12 "argx" "25" } } */ __asm__ volatile (NOP : : "g" (varx)); /* { dg-final { gdb-test 12 "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; }
Go to most recent revision | Compare with Previous | Blame | View Log