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

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 12 19:23:14 PDT 2018


EricWF added a comment.

OK, here's what I would do:

(1) Split the vector, nullptr, and other weirdly failing tests into their own files.
(2) In each file, use `defined(TEST_COMPILER_GCC) && __GXX_ABI_VERSION > 1006` (or w/e version is broken) to define a macro when the test is expected to fail.
(3) Either `ifdef` out failing tests, or change the assertion to expect failure. The latter is probably preferable as it will allow us to detect if they test ever starts unexpectedly passing.
(4) Add tests for GCC with different `fabi-version` options. I would make these separate test files which wrap the actual test their targeting. For example:

  //
  // This file is dual licensed under the MIT and the University of Illinois Open
  // Source Licenses. See LICENSE.TXT for details.
  //
  //===----------------------------------------------------------------------===//
  //
  // REQUIRES: gcc, libatomic
  // UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
  //
  // RUN: %cxx -o %t.one.exe %s %all_flags -latomic -fabi-version=2 && %t.one.exe
  // RUN: %cxx -o %t.two.exe %s %all_flags -latomic -fabi-version=6 && %t.two.exe
  // RUN: %cxx -o %t.three.exe %s %all_flags -latomic -fabi-version=9 && %t.three.exe
  
  #include "align-vector-types.sh.cpp"

How does that sound?


https://reviews.llvm.org/D23041





More information about the cfe-commits mailing list