Clobber descriptions may not in any way overlap with an input or output operand. For example, you may not have an operand describing a register class with one member when listing that register in the clobber list. Variables declared to live in specific registers (see Variables in Specified Registers) and used as asm input or output operands must have no part mentioned in the clobber description.
The inline assembly uses
t1
both as input operand (via thecfg
variable) and within the clobber list. This is illegal but due to a bug in clang 12 that has been fixed in clang 14 has gone unnoticed. Quoting from the GCC documentation (https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Clobbers-and-Scratch-Registers-1):This correctly emits an error if using Clang 14 or any version of GCC: https://godbolt.org/z/17zrdK18e
The fix is to simply remove the clobber of
t1
which is safe to do as it is only used as input.