From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31776 invoked by alias); 14 Jan 2003 16:46:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 31732 invoked by uid 71); 14 Jan 2003 16:46:02 -0000 Resent-Date: 14 Jan 2003 16:46:02 -0000 Resent-Message-ID: <20030114164602.31731.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, Neil.Ferguson@aepona.com Received: (qmail 29206 invoked by uid 61); 14 Jan 2003 16:42:30 -0000 Message-Id: <20030114164230.29205.qmail@sources.redhat.com> Date: Tue, 14 Jan 2003 16:46:00 -0000 From: Neil.Ferguson@aepona.com Reply-To: Neil.Ferguson@aepona.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9311: g++ 3.2.1 - ICE on illegal code using templates and inheritance X-SW-Source: 2003-01/txt/msg00883.txt.bz2 List-Id: >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::C' failure.cxx:17: `struct B::' 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==