From ffa987ac40e38e9b2bc246b828b6e79136d58db1 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 13 Oct 2026 21:18:20 +0200 Subject: [PATCH] :white_check_mark: skip patch test on GCC 5 to avoid internal compiler error Signed-off-by: Niels Lohmann --- tests/src/unit-same-number-types.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/src/unit-same-number-types.cpp b/tests/src/unit-same-number-types.cpp index ba42710c1..ba6b45004 100644 --- a/tests/src/unit-same-number-types.cpp +++ b/tests/src/unit-same-number-types.cpp @@ -157,7 +157,10 @@ TEST_CASE_TEMPLATE("same type for number_integer_t and number_unsigned_t", Json, { const Json source = Json::parse(R"({"a": [1, 2, 3], "b": 4})"); const Json target = Json::parse(R"({"a": [1, 5], "c": 6})"); + // GCC 5 crashes with an internal compiler error when instantiating patch_inplace for this type +#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 6 CHECK(source.patch(Json::diff(source, target)) == target); +#endif CHECK(source.flatten().unflatten() == source); }