From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EBAC2398E43F; Thu, 17 Sep 2020 16:20:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EBAC2398E43F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600359607; bh=gDJ/6cCLWVhi+5o7wdScufg3TH/M2Dy4WYV2p9UOH2o=; h=From:To:Subject:Date:From; b=oUe5epSuSFgmQFXohY1LnTRTc+ZGzMTmfdxiPVv7iFCvUUKIj7ylK4X+Ui1DmJM3j R+mjySn1OGnTDskZaNb2wdrGK/DxsL2id/JMyJmiNfcPjJQJzehFg7np9z/KoNFrDl MByCn5lHXDjMarA+X8fpgzzKEry7hIOL0LPifhvA= From: "dominik.muth at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/97091] New: Demangling the name of the type of a lambda accepting variadic auto parameters fails Date: Thu, 17 Sep 2020 16:20:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominik.muth at gmx dot de X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Thu, 17 Sep 2020 16:20:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97091 Bug ID: 97091 Summary: Demangling the name of the type of a lambda accepting variadic auto parameters fails Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: dominik.muth at gmx dot de Target Milestone: --- Demangling the mangled name of [](auto...){} fails with gcc 5, 8, 9, 10, and 11. It works with gcc 6 and 7, however the mangled name is different, see output below. The demangled name main::{lambda(auto:1, ...)#1} looks wrong to me. Should it be main::{lambda(auto:1...)#1} instead? Here is a fairly minimal example to reproduce the bug: // https://wandbox.org/permlink/FVonGE60X1Xi651E #include #include using namespace std; template static string nametype(T v) { return typeid(decltype(v)).name(); } template static string strtype(T v) { return abi::__cxa_demangle(nametype(v).c_str(), nullptr, nullptr, nullp= tr); } template static void puttype(T v) { cout << nametype(v) << endl; cout << "-> " << strtype(v) << endl; } int main() { cout << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__= << " " << __GLIBCXX__ << endl; puttype([](auto...){}); } /* output: 5.5.0 20171010 Z4mainEUlT_zE_ terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid 6.3.0 20161221 Z4mainEUlT_zE_ -> main::{lambda(auto:1, ...)#1} 7.3.0 20180125 Z4mainEUlT_zE_ -> main::{lambda(auto:1, ...)#1} 8.3.0 20190222 Z4mainEUlDpT_E0_ terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid 9.3.0 20200312 Z4mainEUlDpT_E0_ terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid 10.1.0 20200507 Z4mainEUlDpT_E_ terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid 11.0.0 20200915 Z4mainEUlDpT_E_ terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid */=