No the issue is not the reuse of temp register 0x100, but the way ternary are compiled.
For guard ? expr_true : expr_false, first guard is evaluated, then stored as guard, and it's opposite stored as !guard. Then some magic happens for the result, it's translated as !guard * expr_false + guard * expr_true, meaning both expressions are evaluated in any case.
If any of both expression writes to a register, you have an unexpected side effect.
changed the title
Attempt to warn when use of ternary op might fail due to over-writing temp register (?)Oct 10, 2021