From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1534 invoked by alias); 7 Jul 2006 14:25:54 -0000 Received: (qmail 1499 invoked by uid 48); 7 Jul 2006 14:25:46 -0000 Date: Fri, 07 Jul 2006 14:25:00 -0000 Subject: [Bug c++/28301] New: [4.0/4.1/4.2 regression] ICE with broken specialization 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-07/txt/msg00532.txt.bz2 List-Id: The following invalid code snippet triggers an ICE since GCC 3.4.0: =========================================== template struct A { template void foo() // missing ; }; template<> struct A { template void foo(); }; void bar() { A a; a.foo<0>(); } =========================================== bug.cc:4: error: expected initializer before '}' token bug.cc:6: error: explicit specialization in non-namespace scope 'struct A< >' bug.cc:6: error: enclosing class templates are not explicitly specialized bug.cc:6: error: template parameters not used in partial specialization: bug.cc:6: error: '' bug.cc:15: error: expected `}' at end of input bug.cc: In member function 'void A< >::bar()': bug.cc:14: internal compiler error: in retrieve_specialization, at cp/pt.c:819 Please submit a full bug report, [etc.] -- Summary: [4.0/4.1/4.2 regression] ICE with broken specialization 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=28301