aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKai Tietz <ktietz@redhat.com>2014-02-20 15:28:16 +0100
committerKai Tietz <ktietz@gcc.gnu.org>2014-02-20 15:28:16 +0100
commitf238107464c0a36d65d52689b01ac3c0cc8be9cb (patch)
treefd84942f51bd31f9275cf56630bdb855947ab05d /gcc
parent350b83cc917e67622b621d92df29b7306c9183d8 (diff)
downloadgcc-f238107464c0a36d65d52689b01ac3c0cc8be9cb.zip
gcc-f238107464c0a36d65d52689b01ac3c0cc8be9cb.tar.gz
gcc-f238107464c0a36d65d52689b01ac3c0cc8be9cb.tar.bz2
re PR c++/58835 (ICE with __PRETTY_FUNCTION__ in broken function)
PR c++/58835 * semantics.c (finish_fname): Handle error_mark_node. From-SVN: r207955
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/semantics.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9a2d447..7231155 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index eb1c44e..6f32496 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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;
}