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
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).