public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/27640] [4.2 Regression] segfault, related to constructor instantiation and virtual base case and templates and new operator Date: Thu, 18 May 2006 04:25:00 -0000 [thread overview] Message-ID: <20060518042505.26737.qmail@sourceware.org> (raw) In-Reply-To: <bug-27640-12387@http.gcc.gnu.org/bugzilla/> ------- Comment #4 from pinskia at gcc dot gnu dot org 2006-05-18 04:25 ------- Confirmed, reduced testcase: template < class T > struct refcounted : virtual T { template < class A1 > refcounted (const A1 & a1) : T () { } }; struct nfsserv {}; template < class T > void sfsserver_cache_alloc (int *ns) { new refcounted < nfsserv > (*ns); } void usage () { sfsserver_cache_alloc < int > ( 0); } if we change sfsserver_cache_alloc to be a non template it works. If we change the new ... to a local variable it works. if we change the argument type of sfsserver_cache_alloc to nfsserv, we get a secondary bogus error message: t.cc: In constructor 'refcounted<T>::refcounted(const A1&) [with A1 = nfsserv, T = nfsserv]': t.cc:11: instantiated from 'void sfsserver_cache_alloc(nfsserv*) [with T = int]' t.cc:16: instantiated from here t.cc:4: error: could not convert 'a1' to 'bool' -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC build triplet|i486-linux-gnu | GCC host triplet|i486-linux-gnu | GCC target triplet|i486-linux-gnu | Keywords| |ice-on-valid-code Known to fail| |4.2.0 Known to work| |4.1.0 Last reconfirmed|0000-00-00 00:00:00 |2006-05-18 04:25:04 date| | Summary|segfault, related to |[4.2 Regression] segfault, |constructor instantiation |related to constructor | |instantiation and virtual | |base case and templates and | |new operator Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27640
next prev parent reply other threads:[~2006-05-18 4:25 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-05-17 12:32 [Bug c++/27640] New: segfault, related to constructor instantiation tbm at cyrius dot com 2006-05-17 12:33 ` [Bug c++/27640] " tbm at cyrius dot com 2006-05-17 16:28 ` pinskia at gcc dot gnu dot org 2006-05-18 4:01 ` pinskia at gcc dot gnu dot org 2006-05-18 4:25 ` pinskia at gcc dot gnu dot org [this message] 2006-05-21 21:25 ` [Bug c++/27640] [4.2 Regression] segfault, related to constructor instantiation and virtual base case and templates and new operator pinskia at gcc dot gnu dot org 2006-05-22 19:49 ` janis at gcc dot gnu dot org 2006-06-04 19:11 ` mmitchel at gcc dot gnu dot org 2006-06-15 6:25 ` mmitchel at gcc dot gnu dot org 2006-06-16 2:09 ` mmitchel at gcc dot gnu dot org 2006-06-16 2:20 ` mmitchel at gcc dot gnu 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=20060518042505.26737.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).