From f620936cff7573a6d631fc57c152f1f48374463a Mon Sep 17 00:00:00 2001 From: "Serov, Vladimir" Date: Mon, 22 Nov 2021 09:34:41 +0300 Subject: [PATCH] Revert workaround for GCC Signed-off-by: Serov, Vladimir --- test/tbb/test_limiter_node.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/test/tbb/test_limiter_node.cpp b/test/tbb/test_limiter_node.cpp index e3ece18a1a..7f499ca52b 100644 --- a/test/tbb/test_limiter_node.cpp +++ b/test/tbb/test_limiter_node.cpp @@ -125,18 +125,6 @@ struct put_dec_body : utils::NoAssign { }; -template< typename Sender, typename Receiver > -void make_edge_impl(Sender& sender, Receiver& receiver){ -#if __GNUC__ < 12 && !TBB_USE_DEBUG - // Seemingly, GNU compiler generates incorrect code for the call of limiter.register_successor in release (-03) - // The function pointer to make_edge workarounds the issue for unknown reason - auto make_edge_ptr = tbb::flow::make_edge; - make_edge_ptr(sender, receiver); -#else - tbb::flow::make_edge(sender, receiver); -#endif -} - template< typename T > void test_puts_with_decrements( int num_threads, tbb::flow::limiter_node< T >& lim , tbb::flow::graph& g) { parallel_receiver r(g); @@ -367,7 +355,7 @@ void test_reserve_release_messages() { broad.try_put(1); //failed message retrieved. g.wait_for_all(); - make_edge_impl(limit, output_queue); //putting the successor back + tbb::flow::make_edge(limit, output_queue); //putting the successor back broad.try_put(1); //drop the count @@ -465,7 +453,7 @@ void test_try_put_without_successors() { } ); - make_edge_impl(ln, fn); + tbb::flow::make_edge(ln, fn); g.wait_for_all(); CHECK((counter == i * try_put_num / 2));