https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80004
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Component|rtl-optimization |c++ Known to work| |7.0.1 Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot gnu.org Known to fail| |6.3.1 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- The conservative handling in call_may_clobber_ref_p_1 doesn't work: /* Handle those builtin functions explicitly that do not act as escape points. See tree-ssa-structalias.c:find_func_aliases for the list of builtins we might need to handle here. */ if (callee != NULL_TREE && gimple_call_builtin_p (call, BUILT_IN_NORMAL)) switch (DECL_FUNCTION_CODE (callee)) { ... /* __sync_* builtins and some OpenMP builtins act as threading barriers. */ #undef DEF_SYNC_BUILTIN #define DEF_SYNC_BUILTIN(ENUM, NAME, TYPE, ATTRS) case ENUM: #include "sync-builtins.def" #undef DEF_SYNC_BUILTIN because gimple_call_builtin_p returns false. _10 = __atomic_exchange_1 (&MEM[(struct __atomic_base *)&flag]._M_i, 1, 2); not sure what fixed it on trunk... The '1' is of type int while the prototype seeks for a 'unsigned char'. Somebody should bisect what fixed this.