public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Neil.Ferguson@aepona.com To: gcc-gnats@gcc.gnu.org Subject: c++/9311: g++ 3.2.1 - ICE on illegal code using templates and inheritance Date: Tue, 14 Jan 2003 16:46:00 -0000 [thread overview] Message-ID: <20030114164230.29205.qmail@sources.redhat.com> (raw) >Number: 9311 >Category: c++ >Synopsis: g++ 3.2.1 - ICE on illegal code using templates and inheritance >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Tue Jan 14 08:46:01 PST 2003 >Closed-Date: >Last-Modified: >Originator: Neil Ferguson >Release: gcc version 3.2.1 >Organization: >Environment: g++ -v: Reading specs from /users/nf50041/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/specs Configured with: ../gcc-3.2.1-original/configure --prefix=/users/nf50041 --with-gnu-as --with-gnu-ld --enable-languages=c,c++ Thread model: posix gcc version 3.2.1 Also using binutils-2.13.1; uname -a gives: SunOS waverley 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10 and the architecture is (Ultra) sparc32. >Description: The attached (very small) source file causes an ICE when compiled. It defines two class templates, A and B, then tries to define class C as an inner class of B, inheriting from A. However, the definition of B does not include a declaration of C. Deleting the inheritance from A allows the compiler to correctly output this error: failure.cxx:17: invalid definition of qualified type `B<T>::C' failure.cxx:17: `struct B<T>::<anonymous>' does not declare a template type Uncommenting the declaration of C in B produces legal code, which the compiler compiles without trouble. >How-To-Repeat: Run: g++ -c failure.cxx and you should get: failure.cxx:17: internal error: Segmentation Fault >Fix: None known (write legal code :-) >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="failure.cxx" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="failure.cxx" Ly8gRmFpbHVyZSBjYXNlLiAKCnRlbXBsYXRlPHR5cGVuYW1lIFQ+CmNsYXNzIEEKewoKfTsKCnRl bXBsYXRlPHR5cGVuYW1lIFQ+IApjbGFzcyBCIAp7CiAgICAvLyBjbGFzcyBDOwp9OyAKCnRlbXBs YXRlPHR5cGVuYW1lIFQ+CmNsYXNzIEI8VD46OkMgOiBwdWJsaWMgQTxUPiAKewoKfTsgCg==
reply other threads:[~2003-01-14 16:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030114164230.29205.qmail@sources.redhat.com \ --to=neil.ferguson@aepona.com \ --cc=gcc-gnats@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).