http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51011
--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> 2011-11-08 03:18:36 UTC --- Yeah, it looks like I'll have to change the built-in mechanism slightly. I followed the __sync methodology, but they dont resolve to function calls unless they are in libgcc I think. The __atomic calls resolve to actual external references. I think I need to change the initial def's in sync-builtins.def to indicate there is a fallthrough function call, and make a few additional tweaks to make sure it gets the right name. I'll look into that tomorrow.