https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61317
Bug ID: 61317 Summary: ones complement fails when using increment(++) into an array Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: richard at rjriley dot info Created attachment 32855 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32855&action=edit Test program and results When taking the one's complement of a number with the result going to an array using an auto-incremented index, the new gcc produces incorrect values. ints[j++]=~ints[j-1] & 0xFF; does not produce the same (correct) value as a = ~ints[j-1] & 0xFF; ints[j++] = a;