public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "bugmenot at mailinator dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug c++/28952] New: Incorrect overload detected for function returning std::string ([abi:cxx11]) Date: Thu, 10 Mar 2022 05:16:02 +0000 [thread overview] Message-ID: <bug-28952-4717@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2022-03-10 5:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-10 5:16 bugmenot at mailinator dot com [this message] 2022-03-10 5:17 ` [Bug c++/28952] " bugmenot at mailinator dot com 2022-03-10 17:11 ` ssbssa at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-28952-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).