I was expecting that in my following code:
#include
int main(){
int i = 10;
int j = 10;
j = ++(i | i);
printf(\"%d %d\\n\
I don't think at all it is an optimization error, because if it was, then there should not be any error in the first place. If ++(i | i) is optimized to ++(i), then there should not be any error, because (i) is an lvalue.
IMHO, I think that the compiler sees (i | i) as an expression output, that, obviously, outputs rvalue, but the increment operator ++ expects an lvalue to change it, thus the error.