From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D92F3858C2C; Tue, 4 Jan 2022 08:31:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D92F3858C2C From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103868] ICE at end of coroutine when using asio Date: Tue, 04 Jan 2022 08:31:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: ice-on-valid-code, needs-bisection, needs-reduction X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2022 08:31:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103868 --- Comment #3 from Martin Li=C5=A1ka --- Created attachment 52116 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52116&action=3Dedit Partially reduced test-case The test-case fails with the following on master: $ ./xgcc -B. /tmp/x.ii -c -std=3Dc++20 -w during RTL pass: expand /tmp/x.ii: In function =E2=80=98void malloy::test::client_ws_handler_coro(client_ws_handler_coro(malloy::= error_code, std::shared_ptr >)::_ZN6malloy4test22client_ws_handler_coroILb0EEEN5boost4asio9awaitableIvN= S3_15any_io_executorEEENS2_6system10error_codeESt10shared_ptrINS_9websocket= 10connectionILb1EEEE.Frame*)=E2=80=99: /tmp/x.ii:1035:70: internal compiler error: in make_decl_rtl, at varasm.c:1= 446 1035 | auto size =3D co_await conn->read(*buffer, boost::asio::use_await= able); | = ^ 0x8f7d91 make_decl_rtl(tree_node*) /home/marxin/Programming/gcc/gcc/varasm.c:1446 0xe7ede7 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /home/marxin/Programming/gcc/gcc/expr.c:10550 0xe87d77 expand_expr /home/marxin/Programming/gcc/gcc/expr.h:301 0xe87d77 expand_expr_addr_expr_1 /home/marxin/Programming/gcc/gcc/expr.c:8427 0xe7e2c4 expand_expr_addr_expr /home/marxin/Programming/gcc/gcc/expr.c:8548 0xe7e2c4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /home/marxin/Programming/gcc/gcc/expr.c:11764 0xe8aa46 store_expr(tree_node*, rtx_def*, int, bool, bool) /home/marxin/Programming/gcc/gcc/expr.c:6087 0xe8c25d expand_assignment(tree_node*, tree_node*, bool) /home/marxin/Programming/gcc/gcc/expr.c:5819 0xd4b07a expand_gimple_stmt_1 /home/marxin/Programming/gcc/gcc/cfgexpand.c:3930 0xd4b07a expand_gimple_stmt /home/marxin/Programming/gcc/gcc/cfgexpand.c:4028 0xd5155c expand_gimple_basic_block /home/marxin/Programming/gcc/gcc/cfgexpand.c:6069 0xd53727 execute /home/marxin/Programming/gcc/gcc/cfgexpand.c:6795 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. Note it uses coroutines and -fconcepts. $ (gdb) p debug_tree(decl) unit-size align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff7462b28 fields public abstract external autoinline decl_3 decl_8 QI /tmp/x.ii:982:7 align:16 warn_if_not_align:0 context full-name "constexpr boost::asio::detail::awaitable_frame::~awaitable_frame() noexcept ()" not-really-extern chain > context full-name "std::__n4861::coroutine_traits, boost::system::error_code, std::shared_ptr > >::promise_type" X() X(constX&) this=3D(X&) n_parents=3D1 use_template=3D1 interface= -unknown pointer_to_this chain > addressable used read QI /tmp/x.ii:1035:70 size unit-size align:8 warn_if_not_align:0> $1 =3D void=