https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107581
--- Comment #4 from Marc Poulhiès <dkm at gcc dot gnu.org> ---
You're correct, builtin_decl_explicit returns NULL.
As for the lib and fcode:
8186 {
8187 enum built_in_function lib;
8188 mode = get_builtin_sync_mode (fcode -
BUILT_IN_ATOMIC_ADD_FETCH_1);
8189 lib = (enum built_in_function)((int)BUILT_IN_ATOMIC_FETCH_ADD_1
+
8190 (fcode -
BUILT_IN_ATOMIC_ADD_FETCH_1));
> 8191 target = expand_builtin_atomic_fetch_op (mode, exp, target,
> PLUS, true,
8192 ignore, lib);
8193 if (target)
8194 return target;
8195 break;
(rr) p lib
$8 = BUILT_IN_ATOMIC_FETCH_ADD_4
(rr) p fcode
$9 = BUILT_IN_ATOMIC_ADD_FETCH_4
Let me know if I can do anything else to help.