Looks UB to me. a modified more than once at two points in the sequence.
The result (a=b) is lvalue 1 which is a reference to a
1 Result The assignment operation is the value stored in the left operand after the assignment is completed; The result is an lvalue ($ 5.17 / 1).
source share