public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pippadav at dei dot unipd dot it" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/17080] New: internal compiler error on template class in template class; Date: Wed, 18 Aug 2004 12:32:00 -0000 [thread overview] Message-ID: <20040818123212.17080.pippadav@dei.unipd.it> (raw) This program make gcc 3.3.3 report an "internal compiler error, segfault": (that's the complete source code, no includes needed; compiler version included in comment in code) ---------------------------- #define TRIGGER_BUG class EmptyClass {}; template <template <class U_client> class T_coreService> class SubClass { protected: template <class U_client> class CoreService : public T_coreService< U_client > {}; public: class Core : public CoreService< EmptyClass > {}; }; #ifdef TRIGGER_BUG /**** ***** ***** This makes the declaration of X_list in the main() segfault gcc 3.3.3: Reading specs from /KNOPPIX/usr/bin/../lib/gcc-lib/i486-linux/3.3.3/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal, objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc version 3.3.3 (Debian 20040429) ***** ***** *****/ template <class U> class CollectionServices { public: template <class U_client> class CoreService : public U_client {}; }; template <class U> class Collection : public SubClass<CollectionServices<U>::CoreService> {}; #else /**** ***** ***** This code does not trigger the bug, the thing changes is that this class have no <class U> param, and so is invoked by the Collection declaration. ***** ***** *****/ class CollectionServices { public: template <class U_client> class CoreService : public U_client {}; }; class Collection : public SubClass<CollectionServices::CoreService> {}; #endif struct Dummy {}; typedef Collection<Dummy>::Core List; int main() { List X_list; return 0; } -- Summary: internal compiler error on template class in template class; Product: gcc Version: 3.3.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pippadav at dei dot unipd dot it CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17080
next reply other threads:[~2004-08-18 12:32 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-08-18 12:32 pippadav at dei dot unipd dot it [this message] 2004-08-18 12:57 ` [Bug c++/17080] " reichelt at gcc dot gnu dot org 2004-08-18 21:18 ` pippadav at dei dot unipd dot it
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=20040818123212.17080.pippadav@dei.unipd.it \ --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).