Commit 79faac54 by Paolo Carlini Committed by Paolo Carlini

re PR c++/37649 (ICE with invalid template class)

/cp
2008-09-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/37649
	* name-lookup.c (maybe_process_template_type_declaration): Check
	return value of push_template_decl_real for error_mark_node.

/testsuite
2008-09-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/37649
	* g++.dg/template/crash82.C: New.

From-SVN: r140670
parent 6ffef2ad
2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/37649
* name-lookup.c (maybe_process_template_type_declaration): Check
return value of push_template_decl_real for error_mark_node.
2008-09-24 Aldy Hernandez <aldyh@redhat.com>
* semantics.c (finish_fname): Pass location to fname_decl.
......
......@@ -4936,6 +4936,9 @@ maybe_process_template_type_declaration (tree type, int is_friend,
tree name = DECL_NAME (decl);
decl = push_template_decl_real (decl, is_friend);
if (decl == error_mark_node)
return error_mark_node;
/* If the current binding level is the binding level for the
template parameters (see the comment in
begin_template_parm_list) and the enclosing level is a class
......
2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/37649
* g++.dg/template/crash82.C: New.
2008-09-25 Tobias Burnus <burnus@net-b.de>
PR fortran/37504
......
// PR c++/37649
struct A
{
template<int> struct {}; // { dg-error "template class without a name" }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment