https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113772
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Iain Buclaw from comment #4) > Looking at gcc/builtins.cc, I have a bad feeling that the only compile-time > values one can get out of this built-in are "true" and "defer to run-time" > > --- > /* Return a one or zero if it can be determined that object ARG1 of size ARG > is lock free on this architecture. */ > > static tree > fold_builtin_atomic_is_lock_free (tree arg0, tree arg1) > { > if (!flag_inline_atomics) > return NULL_TREE; > > /* If it isn't always lock free, don't generate a result. */ > if (fold_builtin_atomic_always_lock_free (arg0, arg1) == boolean_true_node) > return boolean_true_node; > > return NULL_TREE; > } > --- > > The upstream contributor who tested this on x86 likely didn't get this > because it's all lock-free. indeed x86_64 and i686 both build fine .. but "it's all lock-free" is not entirely true - x86-64 is only lock free up to 16bytes, so it might be a bug waiting to happen there too.