Architecture maintainers please note: if your architecture supports floating-point exceptions, you should add a definition of the TARGET_ATOMIC_ASSIGN_EXPAND_FENV target hook so that they are handled correctly for C11 atomic compound assignments. This will normally generate inline code together with a call to __atomic_feraiseexcept from libatomic; see the i386 implementation for an example, along with the hook documentation. (The implementation for most architectures should be simpler than that for i386 because they will only have to deal with a single choice of FPU implementation.) It should not generate calls to libm, or to libc functions in the user's namespace, but may call implementation-namespace functions from libgcc or libatomic or libc, or C11 functions from libc if you know they'll be available in libc on your target.
The test gcc.dg/atomic/c11-atomic-exec-5.c will indicate if this is working correctly for your architecture, as long as your system supports pthreads (required to run that test). If any of the other c11-atomic-exec-* tests are failing, you should fix that first as it indicates a more serious issue with atomic operations on your target. If your architecture does not support floating-point exceptions, you can ignore this hook (but should still fix any c11-atomic-exec-* test failures seen); the default hook implementation will be right in that case. -- Joseph S. Myers jos...@codesourcery.com