public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zeccav at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50184] Segmentation fault. Copy Constructor. Date: Mon, 24 Aug 2015 12:07:00 -0000 [thread overview] Message-ID: <bug-50184-4-il0bnkHWuH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-50184-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50184 Vittorio Zecca <zeccav at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zeccav at gmail dot com --- Comment #4 from Vittorio Zecca <zeccav at gmail dot com> --- I still have the same bug in g++ 5.2.0 in the following: #include <map> #include <string> using namespace std; struct CData { struct CItem { string m_str1; }; map<string, CItem> m_map; std::string m_strDFName; int m_nDFMsgTimeout; }; CData func() { CData data; data.m_map["Test"].m_str1 = "Data"; return data; } class B : public CData { public: B() : CData(func()) { std::string s; map<string, CItem>::iterator it = m_map.begin(); for (; it != m_map.end(); it++) // loops past the end { s += it->second.m_str1 + it->first;; } } }; int main() { B b1; return 0; }
prev parent reply other threads:[~2015-08-24 12:07 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-08-25 9:02 [Bug c++/50184] New: " EugeneSm at yandex dot ru 2011-08-25 9:16 ` [Bug c++/50184] " EugeneSm at yandex dot ru 2011-08-25 10:24 ` redi at gcc dot gnu.org 2011-08-25 11:14 ` redi at gcc dot gnu.org 2015-08-24 12:07 ` zeccav at gmail dot com [this message]
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-50184-4-il0bnkHWuH@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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).