This is a documented GCC feature that partially doesn't work with Clang:
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Output-Operands
https://www.felixcloutier.com/documents/gcc-asm.html#puts
Here's a Godbolt example of this behavior: https://godbolt.org/z/v7q7oso75 (as you can see GCC has no issues compiling and running the example while Clang doesn't even compile it)
Using a r constraint would work here (but that's still a difference in behavior)