From 3c4e974d7b05d69c620ed76b8a23b461bf99eee6 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 17 Jun 2020 19:27:47 +0000 Subject: [PATCH] cxxrtl: don't compute vital values in log_assert(). This breaks NDEBUG builds. Fixes #2166. --- backends/cxxrtl/cxxrtl_backend.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc index 909e1325d..58660fb37 100644 --- a/backends/cxxrtl/cxxrtl_backend.cc +++ b/backends/cxxrtl/cxxrtl_backend.cc @@ -1839,7 +1839,8 @@ struct CxxrtlWorker { topo_design.edge(cell_module, module); } } - log_assert(topo_design.sort()); + bool no_loops = topo_design.sort(); + log_assert(no_loops); modules.insert(modules.end(), topo_design.sorted.begin(), topo_design.sorted.end()); if (split_intf) { -- 2.30.2