From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0998B398E466; Fri, 22 Jan 2021 18:02:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0998B398E466 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98545] [11 Regression] ICE in write_expression, at cp/mangle.c:3352 Date: Fri, 22 Jan 2021 18:02:56 +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.0 X-Bugzilla-Keywords: 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: P1 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Fri, 22 Jan 2021 18:02:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98545 --- Comment #4 from CVS Commits --- The master branch has been updated by Marek Polacek : https://gcc.gnu.org/g:25fc4d01a8ed1888e6a65597a3387349eb3c950c commit r11-6864-g25fc4d01a8ed1888e6a65597a3387349eb3c950c Author: Marek Polacek Date: Wed Jan 13 16:33:39 2021 -0500 c++: ICE when mangling operator name [PR98545] r11-6301 added some asserts in mangle.c, and now we trip over one of them. In particular, it's the one asserting that we didn't get IDENTIFIER_ANY_OP_P when mangling an expression with a dependent name. As this testcase shows, it's possible to get that, so turn the assert into an if and write "on". That changes the mangling in the following way: With this patch: $ c++filt _ZN1i1hIJ1adS1_EEEDTcldtdefpTonclspcvT__EEEDpS2_ decltype (((*this).(operator()))((a)(), (double)(), (a)())) i::h(a, double, a) G++10: $ c++filt _ZN1i1hIJ1adS1_EEEDTcldtdefpTclspcvT__EEEDpS2_ decltype (((*this).(operator()))((a)(), (double)(), (a)())) i::h(a, double, a) clang++/icc: $ c++filt _ZN1i1hIJ1adS1_EEEDTclonclspcvT__EEEDpS2_ decltype ((operator())((a)(), (double)(), (a)())) i::h(a, double, a) This is now tracked in PR98756. gcc/cp/ChangeLog: PR c++/98545 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses warnings regardless of abi_version_at_least. (write_expression): When the expression is a dependent name and an operator name, write "on" before writing its name. gcc/ChangeLog: PR c++/98545 * doc/invoke.texi: Update C++ ABI Version 15 description. gcc/testsuite/ChangeLog: PR c++/98545 * g++.dg/abi/mangle76.C: New test.=