public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28952] New: Incorrect overload detected for function returning std::string ([abi:cxx11])
@ 2022-03-10 5:16 bugmenot at mailinator dot com
2022-03-10 5:17 ` [Bug c++/28952] " bugmenot at mailinator dot com
2022-03-10 17:11 ` ssbssa at sourceware dot org
0 siblings, 2 replies; 3+ messages in thread
From: bugmenot at mailinator dot com @ 2022-03-10 5:16 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28952
Bug ID: 28952
Summary: Incorrect overload detected for function returning
std::string ([abi:cxx11])
Product: gdb
Version: 10.1
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: bugmenot at mailinator dot com
Target Milestone: ---
Similar bug: https://sourceware.org/bugzilla/show_bug.cgi?id=19436
To reproduce:
=== file: a.cpp
```
#include<string>
struct A {};
struct B {};
std::string function(A){ return "A"; }
std::string function(B){ return "B"; }
int main(){
A a {};
B b {};
__builtin_trap();
}
```
Compile with `g++ -g a.cpp`, then execute `run` then `function(a)` in gdb.
Actual result: "B"
Expected result: "A"
With `-D_GLIBCXX_USE_CXX11_ABI=0` the bug does not happen.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/28952] Incorrect overload detected for function returning std::string ([abi:cxx11])
2022-03-10 5:16 [Bug c++/28952] New: Incorrect overload detected for function returning std::string ([abi:cxx11]) bugmenot at mailinator dot com
@ 2022-03-10 5:17 ` bugmenot at mailinator dot com
2022-03-10 17:11 ` ssbssa at sourceware dot org
1 sibling, 0 replies; 3+ messages in thread
From: bugmenot at mailinator dot com @ 2022-03-10 5:17 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28952
John Doe <bugmenot at mailinator dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/28952] Incorrect overload detected for function returning std::string ([abi:cxx11])
2022-03-10 5:16 [Bug c++/28952] New: Incorrect overload detected for function returning std::string ([abi:cxx11]) bugmenot at mailinator dot com
2022-03-10 5:17 ` [Bug c++/28952] " bugmenot at mailinator dot com
@ 2022-03-10 17:11 ` ssbssa at sourceware dot org
1 sibling, 0 replies; 3+ messages in thread
From: ssbssa at sourceware dot org @ 2022-03-10 17:11 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28952
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ssbssa at sourceware dot org
--- Comment #1 from Hannes Domani <ssbssa at sourceware dot org> ---
find_overload_match() fails because cp_demangled_name_to_comp() inside
cp_func_name() returns NULL when called with "function[abi:cxx11](B)".
So it looks like cp-name-parser.y can't hangle these abi tags.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-10 17:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 5:16 [Bug c++/28952] New: Incorrect overload detected for function returning std::string ([abi:cxx11]) bugmenot at mailinator dot com
2022-03-10 5:17 ` [Bug c++/28952] " bugmenot at mailinator dot com
2022-03-10 17:11 ` ssbssa at sourceware dot 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).