Index: test/libcxx/atomics/atomics.align/align.pass.sh.cpp =================================================================== --- test/libcxx/atomics/atomics.align/align.pass.sh.cpp +++ test/libcxx/atomics/atomics.align/align.pass.sh.cpp @@ -11,10 +11,6 @@ // REQUIRES: libatomic // RUN: %build -latomic // RUN: %run -// -// GCC currently fails because it needs -fabi-version=6 to fix mangling of -// std::atomic when used with __attribute__((vector(X))). -// XFAIL: gcc // Index: test/libcxx/test/config.py =================================================================== --- test/libcxx/test/config.py +++ test/libcxx/test/config.py @@ -306,6 +306,11 @@ # Configure extra flags compile_flags_str = self.get_lit_conf('compile_flags', '') self.cxx.compile_flags += shlex.split(compile_flags_str) + # GCC ABI version 6 first appeared in G++ 4.7, corrects the mangling of + # template argument packs, which is required for the atomics.align test. + abi_flag = '-fabi-version=6' + if self.cxx.hasCompileFlag(abi_flag): + self.cxx.compile_flags += [abi_flag] def configure_default_compile_flags(self): # Try and get the std version from the command line. Fall back to