public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/97091] New: Demangling the name of the type of a lambda accepting variadic auto parameters fails
@ 2020-09-17 16:20 dominik.muth at gmx dot de
2022-10-07 16:56 ` [Bug demangler/97091] " ppalka at gcc dot gnu.org
2022-10-07 17:05 ` ppalka at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: dominik.muth at gmx dot de @ 2020-09-17 16:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97091
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 <iostream>
#include <cxxabi.h>
using namespace std;
template <typename T>
static string nametype(T v)
{
return typeid(decltype(v)).name();
}
template <typename T>
static string strtype(T v)
{
return abi::__cxa_demangle(nametype(v).c_str(), nullptr, nullptr, nullptr);
}
template <typename T>
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
*/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug demangler/97091] Demangling the name of the type of a lambda accepting variadic auto parameters fails
2020-09-17 16:20 [Bug libstdc++/97091] New: Demangling the name of the type of a lambda accepting variadic auto parameters fails dominik.muth at gmx dot de
@ 2022-10-07 16:56 ` ppalka at gcc dot gnu.org
2022-10-07 17:05 ` ppalka at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-10-07 16:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97091
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hasse.christoph at cern dot ch
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
*** Bug 102851 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug demangler/97091] Demangling the name of the type of a lambda accepting variadic auto parameters fails
2020-09-17 16:20 [Bug libstdc++/97091] New: Demangling the name of the type of a lambda accepting variadic auto parameters fails dominik.muth at gmx dot de
2022-10-07 16:56 ` [Bug demangler/97091] " ppalka at gcc dot gnu.org
@ 2022-10-07 17:05 ` ppalka at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-10-07 17:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97091
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |13.0
CC| |nathan at acm dot org,
| |ppalka at gcc dot gnu.org
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
After r13-3167-geb491ea5c10955, trunk outputs:
13.0.0 20221007
Z4mainEUlDpT_E_
-> main::{lambda((auto:1)...)#1}
So I suppose this can be resolved as fixed for GCC 13.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-07 17:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 16:20 [Bug libstdc++/97091] New: Demangling the name of the type of a lambda accepting variadic auto parameters fails dominik.muth at gmx dot de
2022-10-07 16:56 ` [Bug demangler/97091] " ppalka at gcc dot gnu.org
2022-10-07 17:05 ` ppalka at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).