From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8695 invoked by alias); 29 Apr 2003 19:56:01 -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 8668 invoked by uid 71); 29 Apr 2003 19:56:00 -0000 Resent-Date: 29 Apr 2003 19:56:00 -0000 Resent-Message-ID: <20030429195600.8666.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, reichelt@igpm.rwth-aachen.de Received: (qmail 8304 invoked by uid 48); 29 Apr 2003 19:55:24 -0000 Message-Id: <20030429195524.8303.qmail@sources.redhat.com> Date: Tue, 29 Apr 2003 19:56:00 -0000 From: reichelt@igpm.rwth-aachen.de Reply-To: reichelt@igpm.rwth-aachen.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10554: ICE with illegal using declaration X-SW-Source: 2003-04/txt/msg01396.txt.bz2 List-Id: >Number: 10554 >Category: c++ >Synopsis: ICE with illegal using declaration >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Tue Apr 29 19:56:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Volker Reichelt >Release: gcc 3.4-20030402 >Organization: >Environment: i686-pc-linux-gnu >Description: Consider the following code snippet: -------------------------------snip here------------------------ template struct A { typedef A X; void foo(); }; template struct B : A { using X::foo; }; -------------------------------snip here------------------------ X is declared in template class A and there's a using declaration in a derived class that uses X. The using declaration is illegal, it should of course read "using A::X::foo;". Alternatively one could add a "using typename A::X;" before (which presently does not work due to PR 9447). Due to incorrect name lookup the above code compiles with gcc 3.2.x and 3.3 branch. With mainline we get an ICE: PR8582C.cc:9: error: `X' is not a class-name or namespace-name PR8582C.cc:9: error: expected nested-name-specifier PR8582C.cc:9: internal compiler error: Segmentation fault Please submit a full bug report, [etc.] So we have an ice-on-illegal-code (error recovery problem) on mainline which is not a regression. The situation is actually an improvement on mainline, because we had an accepts-illegal before and now we only have an error recovery problem. But it's still a bug. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: