public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/44827] g++4.3.4 segfaults when using boost::intrusive::list Date: Mon, 05 Jul 2010 23:26:00 -0000 [thread overview] Message-ID: <20100705232624.10904.qmail@sourceware.org> (raw) In-Reply-To: <bug-44827-19403@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from redi at gcc dot gnu dot org 2010-07-05 23:26 ------- unpreprocessed source (because preprocessed boost source is so dependent on compiler version it often won't compile with other versions) #include <boost/intrusive/list.hpp> struct A : public boost::intrusive::list_base_hook<> { virtual ~A() {} }; template<class X> struct D : A { X x; D(const X& x) : x(x) {} }; typedef boost::intrusive::list<A> A_list; struct data_holder { A_list a; template<class C> static void delete_disposer(C* c){ delete c; } template<class X> D<X>* insert(const X& x){ D<X> *t = new D<X>(x); a.push_back(*t); return t; } template<class X> void remove(D<X>* t){ A_list::iterator it = A_list::s_iterator_to(*t); a.erase_and_dispose(it, delete_disposer<A>); } }; int main() { data_holder data; D<int> *i = data.insert(10); data.remove(i); return 0; } This ICEs with Boost 1.39 or current Boost trunk, using any of 4.5.1, 4.6.0 or Fedora 4.4.3 -- redi at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail| |4.4.4 4.5.1 4.6.0 Last reconfirmed|0000-00-00 00:00:00 |2010-07-05 23:26:24 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44827
next prev parent reply other threads:[~2010-07-05 23:26 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-07-05 22:26 [Bug c++/44827] New: " chtz at informatik dot uni-bremen dot de 2010-07-05 22:28 ` [Bug c++/44827] " chtz at informatik dot uni-bremen dot de 2010-07-05 23:26 ` redi at gcc dot gnu dot org [this message] 2010-07-05 23:28 ` redi at gcc dot gnu dot org 2010-07-06 22:07 ` chtz at informatik dot uni-bremen dot de 2010-07-06 23:09 ` redi at gcc dot gnu dot org 2010-07-11 12:56 ` davek at gcc dot gnu dot org [not found] <bug-44827-4@http.gcc.gnu.org/bugzilla/> 2011-10-02 10:15 ` paolo.carlini at oracle dot com
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=20100705232624.10904.qmail@sourceware.org \ --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).