Could another approach be taken, where local variables are considered implicitly “register”? In that case this simple example has no problem whatsoever. It does arise unnecessarily if the address of a local is taken but does not escape, but that ought to be rare.
you don't know that void b() isn't implemented as
with 1638541351 sometimes being the address of x above ?