Skip to content

Commit 01f7134

Browse files
philnik777tru
authored andcommitted
[libc++] Fix problems with GCC 13 and switch to it in the CI
Reviewed By: #libc, #libc_abi, Mordante Spies: arphaman, Mordante, libcxx-commits, arichardson Differential Revision: https://reviews.llvm.org/D157060
1 parent 4b414e5 commit 01f7134

File tree

8 files changed

+19
-5
lines changed

8 files changed

+19
-5
lines changed

libcxx/include/__type_traits/is_nothrow_constructible.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
_LIBCPP_BEGIN_NAMESPACE_STD
2424

25-
#if __has_builtin(__is_nothrow_constructible)
25+
// GCC is disabled due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106611
26+
#if __has_builtin(__is_nothrow_constructible) && !defined(_LIBCPP_COMPILER_GCC)
2627

2728
template < class _Tp, class... _Args>
2829
struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible

libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// UNSUPPORTED: clang-15, clang-16, clang-17
1616

1717
// TODO: Investigate this failure on GCC 12 (in Ubuntu Jammy)
18-
// UNSUPPORTED: gcc-12
18+
// UNSUPPORTED: gcc-12, gcc-13
1919

2020
// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} -g %{link_flags}
2121
// Ensure locale-independence for unicode tests.

libcxx/test/std/algorithms/robust_against_adl.compile.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// https://buildkite.com/llvm-project/libcxx-ci/builds/15823#0184fc0b-d56b-4774-9e1d-35fe24e09e37
1212
// It seems like the CI gcc version is buggy. I can't reproduce the failure on my system or on
1313
// godbolt (https://godbolt.org/z/rsPv8e8fn).
14-
// UNSUPPORTED: gcc-12
14+
// UNSUPPORTED: gcc-12, gcc-13
1515

1616
#include <algorithm>
1717
#include <cstddef>

libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// UNSUPPORTED: c++03, c++11, c++14, c++17
99
// TODO FMT __builtin_memcpy isn't constexpr in GCC
10-
// UNSUPPORTED: gcc-12
10+
// UNSUPPORTED: gcc-12, gcc-13
1111

1212
// <format>
1313

libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ int main(int, char**)
117117

118118
// Non-referencable function type
119119
static_assert((!std::is_convertible<ConstFunction, Function>::value), "");
120+
// TODO(LLVM-19): Re-enable this once we switch to GCC 14. This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109680
121+
#ifndef TEST_COMPILER_GCC
120122
static_assert((!std::is_convertible<ConstFunction, Function*>::value), "");
121123
static_assert((!std::is_convertible<ConstFunction, Function&>::value), "");
122124
static_assert((!std::is_convertible<ConstFunction, Function&&>::value), "");
125+
#endif
123126
static_assert((!std::is_convertible<Function*, ConstFunction>::value), "");
124127
static_assert((!std::is_convertible<Function&, ConstFunction>::value), "");
125128
static_assert((!std::is_convertible<ConstFunction, ConstFunction>::value), "");

libcxx/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// ADDITIONAL_COMPILE_FLAGS: -D _LIBCPP_USE_IS_CONVERTIBLE_FALLBACK
1212

13+
// UNSUPPORTED: gcc-13
14+
1315
// type_traits
1416

1517
// is_convertible

libcxx/utils/libcxx/test/params.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@
5555
# Don't fail compilation in case the compiler fails to perform the requested
5656
# loop vectorization.
5757
"-Wno-pass-failed",
58+
59+
# TODO: Find out why GCC warns in lots of places (is this a problem with always_inline?)
60+
"-Wno-dangling-reference",
61+
"-Wno-mismatched-new-delete",
62+
"-Wno-redundant-move",
63+
64+
# This doesn't make sense in real code, but we have to test it because the standard requires us to not break
65+
"-Wno-self-move",
5866
]
5967

6068
_allStandards = ["c++03", "c++11", "c++14", "c++17", "c++20", "c++23", "c++26"]

libcxxabi/test/catch_member_function_pointer_02.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
// GCC supports noexcept function types but this test still fails.
1717
// This is likely a bug in their implementation. Investigation needed.
18-
// XFAIL: gcc-11, gcc-12
18+
// XFAIL: gcc-11, gcc-12, gcc-13
1919

2020
#include <cassert>
2121

0 commit comments

Comments
 (0)