From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23664 invoked by alias); 4 May 2006 15:32:32 -0000 Received: (qmail 23627 invoked by uid 48); 4 May 2006 15:32:20 -0000 Date: Thu, 04 May 2006 15:32:00 -0000 Subject: [Bug c++/27425] New: [4.0/4.1/4.2 regression] ICE with invalid template-template-parameter 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-05/txt/msg00389.txt.bz2 List-Id: The C++ frontend ICEs on the following invalid code snippet since GCC 3.4.0: ================================================== template struct A { template class> struct B {}; template struct C; B b; }; A<0> a; ================================================== bugB.cc:3: error: 'void' is not a valid type for a template constant parameter bugB.cc:4: error: 'void' is not a valid type for a template constant parameter bugB.cc: In instantiation of 'A<0>': bugB.cc:8: instantiated from here bugB.cc:3: error: 'void' is not a valid type for a template constant parameter bugB.cc:4: error: 'void' is not a valid type for a template constant parameter bugB.cc:4: error: 'void' is not a valid type for a template constant parameter bugB.cc:5: internal compiler error: in coerce_template_parms, at cp/pt.c:4042 Please submit a full bug report, [etc.] With GCC 3.3.3 - 3.3.6 we got sensible error messages. Before GCC 3.3.3 the compiler entered an infinite loop. -- Summary: [4.0/4.1/4.2 regression] ICE with invalid template- template-parameter 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=27425