https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39121
--- Comment #7 from joe.carnuccio at qlogic dot com --- Ok, the sequence points are at each of the assignment operators. The crux of this is that doing the xor chain with dereferenced pointers fails (incorrect execution), whereas doing it with variables works... i.e. *a and *b are being treated differently than a and b; a ^= b ^= a ^= b is supposed to do the following: a = a ^ (b = b ^ (a = a ^ b)) from right-to-left each assignment is done in sequence (and has been verified to work correctly); *a ^= *b ^= *a ^= *b should work the same way, but it does not (unless you compile with -Os).