[PATCH] D23041: Un-XFAIL GCC atomics.align

JF Bastien via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 17:16:56 PDT 2016


jfb created this revision.
jfb added a reviewer: EricWF.
jfb added a subscriber: cfe-commits.

The ABI version flag should fix the error.

https://reviews.llvm.org/D23041

Files:
  test/libcxx/atomics/atomics.align/align.pass.sh.cpp
  test/libcxx/test/config.py

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
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
 
 // <atomic>
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23041.66404.patch
Type: text/x-patch
Size: 1267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160802/c030f17b/attachment.bin>


More information about the cfe-commits mailing list