https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64843
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |documentation, wrong-code Status|UNCONFIRMED |NEW Last reconfirmed| |2015-01-28 Ever confirmed|0 |1 Known to fail| |5.0 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The documentation indeed suggests this: "These built-in functions perform the operation suggested by the name, and return the value that had previously been in @code{*@var{ptr}}. That is, @smallexample @{ tmp = *ptr; *ptr @var{op}= val; return tmp; @} @end smallexample" thus here *(&p) += 1; Whether the bug is in documentation or code is another question. Confirmed that the testcase produces cited assembly on x86_64 and some older trunk.