Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp +++ lib/Basic/Targets.cpp @@ -6797,7 +6797,10 @@ PtrDiffType = SignedLong; break; } - MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; + // Up to 32 bits are lock-free atomic, but we're willing to do atomic ops + // on up to 64 bits. + MaxAtomicPromoteWidth = 64; + MaxAtomicInlineWidth = 32; } void getTargetDefines(const LangOptions &Opts, Index: test/Preprocessor/init.c =================================================================== --- test/Preprocessor/init.c +++ test/Preprocessor/init.c @@ -6913,6 +6913,7 @@ // SPARC:#define __FLT_MIN_EXP__ (-125) // SPARC:#define __FLT_MIN__ 1.17549435e-38F // SPARC:#define __FLT_RADIX__ 2 +// SPARC:#define __GCC_ATOMIC_LLONG_LOCK_FREE 1 // SPARC:#define __INT16_C_SUFFIX__ // SPARC:#define __INT16_FMTd__ "hd" // SPARC:#define __INT16_FMTi__ "hi"