From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D5E093857435; Sun, 3 Oct 2021 19:28:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5E093857435 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95520] [coroutines] __builtin_FUNCTION() returns mangled .actor instead of original function name Date: Sun, 03 Oct 2021 19:28:50 +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: 10.1.0 X-Bugzilla-Keywords: wrong-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: iains at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.4 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 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: Sun, 03 Oct 2021 19:28:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95520 --- Comment #6 from CVS Commits --- The releases/gcc-10 branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:bf455aa06f95edf15b3ee619b1096dde716fed64 commit r10-10165-gbf455aa06f95edf15b3ee619b1096dde716fed64 Author: Iain Sandoe Date: Thu Jul 8 09:42:49 2021 +0100 coroutines: Adjust outlined function names [PR95520]. The mechanism used to date for uniquing the coroutine helper functions (actor, destroy) was over-complicating things and leading to the noted PR and also difficulties in setting breakpoints on these functions (so this will help PR99215 as well). This implementation delegates the adjustment to the mangling to write_encoding() which necessitates some book-keeping so that it is possible to determine which of the coroutine helper names is to be mangled. Signed-off-by: Iain Sandoe PR c++/95520 - [coroutines] __builtin_FUNCTION() returns mangled .actor instead of original function name PR c++/95520 gcc/cp/ChangeLog: * coroutines.cc (struct coroutine_info): Add fields for actor and destroy function decls. (to_ramp): New. (coro_get_ramp_function): New. (coro_get_actor_function): New. (coro_get_destroy_function): New. (act_des_fn): Set up mapping between ramp, actor and destroy functions. (morph_fn_to_coro): Adjust interface to the builder for helper function decls. * cp-tree.h (DECL_ACTOR_FN, DECL_DESTROY_FN, DECL_RAMP_FN, JOIN_STR): New. * mangle.c (write_encoding): Handle coroutine helpers. (write_unqualified_name): Handle lambda coroutine helpers. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr95520.C: New test. (cherry picked from commit 237ab3ee49e2f3110accfcc03b6c0df8b4889f15)=