https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77686
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- This can only uncover another pre-existing issue as it is a 100% obvious fix. I do not have a good way to run anything on arm so please help me spot the wrong-code in the assembler output. TBAA issues are also often exposed by scheduling so please try -fno-schedule-insns[2] or -fstrict-aliasing with -O1. -Updating SSA information for statement MEM[(struct function *)&D.43856 + 4B] = __f$__dummy_a; +Updating SSA information for statement MEM[(struct __lambda0 *)&D.43856] = this might also very well be a C++ FE issue.