From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18417 invoked by alias); 8 Jun 2006 15:26:07 -0000 Received: (qmail 18399 invoked by uid 48); 8 Jun 2006 15:26:00 -0000 Date: Thu, 08 Jun 2006 15:29:00 -0000 Subject: [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-06/txt/msg00945.txt.bz2 List-Id: The following testcase causes an ICE on the 4.1 branch and mainline: ==================================== struct A { template void foo(X); }; ==================================== bug.cc:7: error: 'X' was not declared in this scope bug.cc:7: error: variable or field 'foo' declared void bug.cc:7: internal compiler error: tree check: expected var_decl, have field_decl in cp_finish_decl, at cp/decl.c:4933 Please submit a full bug report, [etc.] This is a very recent regression, since GCC 4.1.1 is not affected. Mark, your patch for PR 27819 seems to have caused this: http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00198.html -- Summary: [4.1/4.2 regression] ICE on invalid template declaration Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, error-recovery, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961