From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25895 invoked by alias); 2 May 2006 19:21:23 -0000 Received: (qmail 25845 invoked by uid 48); 2 May 2006 19:21:19 -0000 Date: Tue, 02 May 2006 19:21:00 -0000 Subject: [Bug c++/27397] New: [4.2 regression] ICE on invalid template argument 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/msg00208.txt.bz2 List-Id: The following invalid code snippet causes an ICE on mainline: ============================= template struct A; ============================= bugA.cc:1: error: expected `)' before '>' token bugA.cc:1: internal compiler error: tree check: accessed elt 1 of tree_vec with 0 elts in get_innermost_template_args, at cp/pt.c:490 Please submit a full bug report, [etc.] A similar testcase causes an ICE in a different function: ============================= template struct A { template struct B; }; A a; ============================= bugB.cc:3: error: expected `)' before '>' token bugB.cc: In instantiation of 'A': bugB.cc:6: instantiated from here bugB.cc:3: internal compiler error: tree check: accessed elt 1 of tree_vec with 0 elts in add_outermost_template_args, at cp/pt.c:459 Please submit a full bug report, [etc.] The second testcase also ICEd before GCC 3.4.0. -- Summary: [4.2 regression] ICE on invalid template argument 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=27397