https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63318
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- asm volatile ( "movl $1, %%eax\n\t" "movl $1, %%edi\n\t" "movq %1, %%rsi\n\t" "movl %2, %%edx\n\t" "syscall" : "=a"(ret) : "g"(hello), "g"(hello_size), "m"(*string) : "%rdi", "%rsi", "%rdx", "%rcx", "%r11" ); Or asm volatile ( "movl $1, %%eax\n\t" "movl $1, %%edi\n\t" "movq %1, %%rsi\n\t" "movl %2, %%edx\n\t" "syscall" : "=a"(ret) : "g"(hello), "g"(hello_size) : "%rdi", "%rsi", "%rdx", "%rcx", "%r11", "memory" );