1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* { dg-do compile } */ const int i = 0; void f(void) { __asm__ __volatile__ ("" : "=m" (i)); /* { dg-error "read-only variable" } */ } void g(const int set) { __asm__ __volatile__ ("" : "=r" (set)); /* { dg-error "read-only parameter" } */ }