From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA5F43858013; Thu, 25 Jan 2024 20:22:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA5F43858013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706214166; bh=/k6ot2m6/tqFbOWMo98+klg9+rqlNe8qnW429SHlJRU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=e7uQ3fjJfbSiGxXsWjagxmL1Acru55eTjSOT36PY9YFZNCvGTmAe8IwFmmQbN9fCo L3gv34wzNqcbaF6o+wNPBIAMiCEq2xTv8b/ssJggDOaPHYrrclbTqGN7BuUqz0W3GS mTzSITdOIoIwUsYQTDcy/FE+K9Ct2Ap1/NzTkJ4s= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109227] coroutines: ICE in tree check: expected record_type or union_type or qual_union_type, have array_type in build_special_member_call, at cp/call.cc:11067 Date: Thu, 25 Jan 2024 20:22:42 +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: 13.0 X-Bugzilla-Keywords: C++-coroutines, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109227 --- Comment #8 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:44868e7298de5048d6f04d7fa098d5bc767c8cb8 commit r14-8437-g44868e7298de5048d6f04d7fa098d5bc767c8cb8 Author: Jason Merrill Date: Thu Jan 25 14:45:35 2024 -0500 c++: co_await and initializer_list [PR109227] Here we end up with an initializer_list of 'aa', a type with a non-triv= ial destructor, and need to destroy it. The code called build_special_member_call for cleanups, but that doesn't work for array= s, so use cxx_maybe_build_cleanup instead. Let's go ahead and do that everywhere that has been calling the destructor directly. PR c++/109227 gcc/cp/ChangeLog: * coroutines.cc (build_co_await): Use cxx_maybe_build_cleanup. (build_actor_fn, process_conditional, maybe_promote_temps) (morph_fn_to_coro): Likewise. (expand_one_await_expression): Use build_cleanup. gcc/testsuite/ChangeLog: * g++.dg/coroutines/co-await-initlist2.C: New test.=