Hi, the following patch adds missing handling of error_mark_node result of fname_decl within finish_fname.
ChangeLog 2014-02-11 Kai Tietz <kti...@redhat.com> PR c++/58835 * semantics.c (finish_fname): Handle error_mark_node. Regression tested for x86_64-unknown-linux-gnu, i686-w64-mingw32. Ok for apply? Regards, Kai Index: semantics.c =================================================================== --- semantics.c (Revision 207686) +++ semantics.c (Arbeitskopie) @@ -2630,7 +2630,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; }