https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Sergei Trofimovich <slyfox at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |slyfox at gcc dot gnu.org --- Comment #8 from Sergei Trofimovich <slyfox at gcc dot gnu.org> --- Created attachment 54505 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54505&action=edit bug.cpp.xz I reproduced it locally as well. Extracted preprocessed file as bug.cpp.xz (not yet reduced). To crash: g++ -O3 -Wall -Wextra -Werror -Wfatal-errors -Wno-error=stringop-overflow -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -mrtm -mwaitpkg -std=c++11 -c bug.cpp -fPIC -fstack-protector-strong --param ssp-buffer-size=4 -fno-strict-overflow during RTL pass: expand In file included from /nix/store/c4xm3qfkw2npn4vyiyx2pkp95rb27ig8-gcc-12.2.0/include/c++/12.2.0/atomic:41, from /home/slyfox/nsn/source/src/tbb/../../include/tbb/../oneapi/tbb/flow_graph.h:20, from /home/slyfox/nsn/source/src/tbb/../../include/tbb/flow_graph.h:17, from /home/slyfox/nsn/source/test/tbb/test_eh_flow_graph.cpp:25: /nix/store/c4xm3qfkw2npn4vyiyx2pkp95rb27ig8-gcc-12.2.0/include/c++/12.2.0/bits/atomic_base.h: In member function 'bool tbb::detail::d1::input_node<std::tuple<int, int> >::_ZThn16_N3tbb6detail2d110input_nodeISt5tupleIJiiEEE18register_successorERNS1_8receiverIS4_EE.artificial_thunk.0(successor_type&)': /nix/store/c4xm3qfkw2npn4vyiyx2pkp95rb27ig8-gcc-12.2.0/include/c++/12.2.0/bits/atomic_base.h:506:36: internal compiler error: in expand_expr_real_1, at expr.cc:10586 506 | return __atomic_exchange_n(&_M_i, __i, int(__m)); | ^~~~~ 0x9764c81 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, char**, diagnostic_t) ???:0 0x976527c internal_error(char const*, ...) ???:0 0x832b252 fancy_abort(char const*, int, char const*) ???:0 0x82f641b expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) [clone .cold] ???:0 0x86d5b33 expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, rtx_def**, expand_modifier) ???:0 0x86e4307 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ???:0 0x86d1ec1 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ???:0 0x86dbda2 expand_expr_addr_expr_1(tree_node*, rtx_def*, scalar_int_mode, expand_modifier, unsigned char) ???:0 0x86d16d4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ???:0 0x86dec8e store_expr(tree_node*, rtx_def*, int, bool, bool) ???:0 0x86e07ba expand_assignment(tree_node*, tree_node*, bool) [clone .part.0] ???:0 0x85cb005 expand_gimple_stmt(gimple*) ???:0 0x85cff76 expand_gimple_basic_block(basic_block_def*, bool) ???:0 0x85d1e56 (anonymous namespace)::pass_expand::execute(function*) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ g++ -v |& unnix Using built-in specs. COLLECT_GCC=/<<NIX>>/gcc-12.2.0/bin/g++ COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-12.2.0/libexec/gcc/i686-unknown-linux-gnu/12.2.0/lto-wrapper Target: i686-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.2.0 (GCC)