re PR c++/58835 (ICE with __PRETTY_FUNCTION__ in broken function)

PR c++/58835
	* semantics.c (finish_fname): Handle error_mark_node.

From-SVN: r207957
This commit is contained in:
Kai Tietz 2014-02-20 15:31:01 +01:00 committed by Kai Tietz
parent ae8b9713a5
commit ea57539c67
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-02-20 Kai Tietz <ktietz@redhat.com>
PR c++/58835
* semantics.c (finish_fname): Handle error_mark_node.
2014-02-19 Jason Merrill <jason@redhat.com>
PR c++/60046

View File

@ -2430,7 +2430,8 @@ finish_fname (tree id)
tree decl;
decl = fname_decl (input_location, C_RID_CODE (id), id);
if (processing_template_decl && current_function_decl)
if (processing_template_decl && current_function_decl
&& decl != error_mark_node)
decl = DECL_NAME (decl);
return decl;
}