From 96a98f8bd1c514b257868d06cb07c9c149c38940 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Mon, 5 Jan 2026 11:57:17 +0100 Subject: [PATCH 1/2] [ci] Add gcc 14 validation for arm Related to #1232 --- .github/workflows/cross-arm.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cross-arm.yml b/.github/workflows/cross-arm.yml index 071e85f25..1f58a506f 100644 --- a/.github/workflows/cross-arm.yml +++ b/.github/workflows/cross-arm.yml @@ -15,6 +15,7 @@ jobs: - { platform: 'aarch64', arch: 'armv8-a', dir: 'aarch64-linux-gnu', flags: '', full: 'ON' } sys: - { compiler: 'gcc', version: '10' } + - { compiler: 'gcc', version: '14' } steps: - name: Setup compiler if: ${{ matrix.sys.compiler == 'gcc' }} From 495a387ec6c15a095e91e3d0f75f752d28c8cf43 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Wed, 7 Jan 2026 08:34:53 +0100 Subject: [PATCH 2/2] Simplify test using a stack allocated array This also happens to fix #1232, although this makes little sense to me. --- test/test_api.cpp | 20 +++++++++++--------- test/test_utils.hpp | 7 +++++++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/test/test_api.cpp b/test/test_api.cpp index 73f74619a..2ffbc26e2 100644 --- a/test/test_api.cpp +++ b/test/test_api.cpp @@ -138,29 +138,31 @@ struct xsimd_api_test batch_type b = batch_type::load(v.data(), xsimd::aligned_mode()); V res(size); - bool* b_data = new bool[size]; + std::array b_data; + + std::array b_ref; + std::fill(b_ref.begin(), b_ref.end(), true); xsimd::store_as(res.data(), b, xsimd::unaligned_mode()); INFO(name, " unaligned"); CHECK_VECTOR_EQ(res, v); - std::fill(b_data, b_data + size, false); + std::fill(b_data.begin(), b_data.end(), false); batch_bool_type bb = (b == b); - xsimd::store_as(b_data, bb, xsimd::unaligned_mode()); + xsimd::store_as(&b_data[0], bb, xsimd::unaligned_mode()); + INFO(name, " batch_bool unaligned"); - CHECK_UNARY(std::accumulate(b_data, b_data + size, true, std::logical_and())); + CHECK_ARRAY_EQ(b_ref, b_data); xsimd::store_as(res.data(), b, xsimd::aligned_mode()); INFO(name, " aligned"); CHECK_VECTOR_EQ(res, v); - std::fill(b_data, b_data + size, false); + std::fill(b_data.begin(), b_data.end(), false); bb = (b == b); - xsimd::store_as(b_data, bb, xsimd::aligned_mode()); + xsimd::store_as(&b_data[0], bb, xsimd::aligned_mode()); INFO(name, " batch_bool aligned"); - CHECK_UNARY(std::accumulate(b_data, b_data + size, true, std::logical_and())); - - delete[] b_data; + CHECK_ARRAY_EQ(b_ref, b_data); } template diff --git a/test/test_utils.hpp b/test/test_utils.hpp index 0da0c6f12..b22cca8ac 100644 --- a/test/test_utils.hpp +++ b/test/test_utils.hpp @@ -538,6 +538,13 @@ namespace detail INFO(#v2 ":", v2); \ CHECK_UNARY(::detail::expect_vector_near(v1, v2)); \ } while (0) +#define CHECK_ARRAY_EQ(v1, v2) \ + do \ + { \ + INFO(#v1 ":", v1); \ + INFO(#v2 ":", v2); \ + CHECK_UNARY(::detail::expect_array_near(v1, v2)); \ + } while (0) namespace xsimd {