Skip to content

Conversation

@lifflander
Copy link
Collaborator

@lifflander lifflander commented Oct 13, 2025

Fixes #2491

The current code is triggering a compiler bug with C++20 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651). This works around the bug by converting the first argument to operator+ to a std::string first.

@lifflander lifflander linked an issue Oct 13, 2025 that may be closed by this pull request
@lifflander lifflander requested a review from nlslatt October 13, 2025 20:08
@github-actions
Copy link

clang-format output for this changeset:

diff --git a/src/vt/configs/debug/debug_print.h b/src/vt/configs/debug/debug_print.h
index 1c3dce171..5c51c3f1b 100644
--- a/src/vt/configs/debug/debug_print.h
+++ b/src/vt/configs/debug/debug_print.h
@@ -77,10 +77,9 @@
 #define vt_print_colorize                                               \
   vt_print_colorize_impl(::vt::debug::bd_green(), "vt", ":")
 
-#define vt_proc_print_colorize(proc)                                    \
-  vt_print_colorize_impl(                                               \
-    ::vt::debug::blue(), std::string("[") + std::to_string(proc) + "]", \
-    ""                                                                  \
+#define vt_proc_print_colorize(proc)                                       \
+  vt_print_colorize_impl(                                                  \
+    ::vt::debug::blue(), std::string("[") + std::to_string(proc) + "]", "" \
   )
 
 #define vt_debug_argument_option(opt)                                   \

@github-actions
Copy link

github-actions bot commented Oct 13, 2025

Pipelines results

vt-build-amd64-ubuntu-20-04-gcc-9-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-clang-9-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-10-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-alpine-3-16-clang-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-gcc-14-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-clang-16-zoltan-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-clang-16-vtk-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-clang-18-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-13-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-12-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-11-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-gcc-12-vtk-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-clang-17-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-14-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-15-cpp-cxx20

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-9-ldms-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-icpx-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-gcc-13-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-clang-10-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-9-cuda-11-4-3-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

/vt/src/vt/runtime/runtime.cc(1117): warning: parameter "comm" was declared but never referenced

/vt/src/vt/runtime/component/component_pack.impl.h(55): warning: parameter "seq" was declared but never referenced
          detected during:
            instantiation of "std::unique_ptr<T, std::default_delete<T>> vt::runtime::component::<unnamed>::tupleCons<T,Tuple>(Tuple &&) [with T=vt::arguments::ArgConfig, Tuple=std::tuple<std::unique_ptr<vt::arguments::ArgConfig, std::default_delete<vt::arguments::ArgConfig>>>]" 
(104): here
            instantiation of "vt::runtime::component::registry::AutoHandlerType vt::runtime::component::ComponentPack::registerComponent(T **, vt::runtime::component::BaseComponent::StartupDepsPack<StartupDeps...>, vt::runtime::component::BaseComponent::RuntimeDepsPack<RuntimeDeps...>, Cons &&...) [with T=vt::arguments::ArgConfig, StartupDeps=<>, RuntimeDeps=<>, Cons=<std::unique_ptr<vt::arguments::ArgConfig, std::default_delete<vt::arguments::ArgConfig>>>]" 
/vt/src/vt/runtime/runtime.cc(770): here

/vt/src/vt/runtime/component/component_pack.impl.h(55): warning: parameter "tup" was declared but never referenced
          detected during:
            instantiation of "std::unique_ptr<T, std::default_delete<T>> vt::runtime::component::<unnamed>::tupleConsImpl<T,Tuple,I...>(Tuple &&, std::index_sequence<I...>) [with T=vt::util::memory::MemoryUsage, Tuple=std::tuple<>, I=<>]" 
(64): here
            instantiation of "std::unique_ptr<T, std::default_delete<T>> vt::runtime::component::<unnamed>::tupleCons<T,Tuple>(Tuple &&) [with T=vt::util::memory::MemoryUsage, Tuple=std::tuple<>]" 
(104): here
            instantiation of "vt::runtime::component::registry::AutoHandlerType vt::runtime::component::ComponentPack::registerComponent(T **, vt::runtime::component::BaseComponent::StartupDepsPack<StartupDeps...>, vt::runtime::component::BaseComponent::RuntimeDepsPack<RuntimeDeps...>, Cons &&...) [with T=vt::util::memory::MemoryUsage, StartupDeps=<vt::ctx

 ==> And there is more. Read log. <==

View job log


vt-build-amd64-ubuntu-20-04-gcc-9-cuda-12-2-0-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

/vt/lib/fmt/include/fmt-vt/base.h(472): warning #128-D: loop is not reachable
    for (; n != 0; ++s1, ++s2, --n) {
    ^
          detected during:
            instantiation of "auto fmt::v11::detail::compare(const Char *, const Char *, std::size_t)->int [with Char=char]" at line 591
            instantiation of "auto fmt::v11::basic_string_view<Char>::compare(fmt::v11::basic_string_view<Char>) const->int [with Char=char]" at line 598
            instantiation of class "fmt::v11::basic_string_view<Char> [with Char=char]" at line 2621
            instantiation of "auto fmt::v11::basic_format_args<Context>::get_id(fmt::v11::basic_string_view<Char>) const->int [with Context=fmt::v11::context, Char=char]" at line 2664

Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"

/vt/lib/fmt/include/fmt-vt/format.h(2596): warning #2417-D: constexpr constructor calls non-constexpr function "fmt::v11::basic_memory_buffer<T, SIZE, Allocator>::basic_memory_buffer(const Allocator &) [with T=fmt::v11::detail::bigint::bigit, SIZE=32UL, Allocator=fmt::v11::detail::allocator<fmt::v11::detail::bigint::bigit>]"
    constexpr bigint() : exp_(0) {}
                                 ^

/vt/lib/fmt/include/fmt-vt/base.h(472): warning #128-D: loop is not reachable
    for (; n != 0; ++s1, ++s2, --n) {
    ^
          detected during:
            instantiation of "auto fmt::v11::detail::compare(const Char *, const Char *, std::size_t)->int [with Char=char]" at line 591
            instantiation of "auto fmt::v11::basic_string_view<Char>::compare(fmt::v11::basic_string_view<Char>) const->int [with Char=char]" at line 598
            instantiation of class "fmt::v11::basic_string_view<Char> [with Char=char]" at line 2621
            instantiation of "auto fmt::v11::basic_format_args<Context>::get_id(fmt::v11::basic_string_view<Char>) const->int [with Context=fmt::v11::context, Char=char]" at line 2664

Remark: The warnings can be suppressed with "-diag-suppress <warning-n

 ==> And there is more. Read log. <==

View job log


vt-build-amd64-ubuntu-22-04-gcc-12-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-gcc-11-cpp

Build for f6a0915 (2025-10-13 20:08:15 UTC)

Compilation – successful

Testing – passed

View job log


@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.57%. Comparing base (1cee0d6) to head (fecf959).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2492      +/-   ##
===========================================
- Coverage    88.58%   88.57%   -0.02%     
===========================================
  Files          728      728              
  Lines        31516    31516              
===========================================
- Hits         27919    27915       -4     
- Misses        3597     3601       +4     
Files with missing lines Coverage Δ
src/vt/configs/debug/debug_print.h 100.00% <ø> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lifflander lifflander merged commit 5fe1b46 into develop Oct 13, 2025
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Work around compiler bug in GCC 12 in string concatenation

3 participants