https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42046
Michael Bruck <bruck.michael at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Michael Bruck <bruck.michael at googlemail dot com> --- 5.2.1 with -Ofast produces ldr r2, .L5 ldr r3, [r2] cmp r0, #0 orrne r3, r3, #1 biceq r3, r3, #1 str r3, [r2] bx lr I'll mark it as fixed. There might be some trick to reduce the core logic (cmp/orrne/biceq) further, but that wasn't my issue.