aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2006-05-15 09:07:17 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2006-05-15 09:07:17 +0000
commitad47b891c8d103457fc9e1e53b518a8d9610534b (patch)
tree434df1be050fd0440ff267586347186783e9f496 /gcc/cp
parent7c60008e24503c831098cd8246e5da5b8fcf3537 (diff)
downloadgcc-ad47b891c8d103457fc9e1e53b518a8d9610534b.zip
gcc-ad47b891c8d103457fc9e1e53b518a8d9610534b.tar.gz
gcc-ad47b891c8d103457fc9e1e53b518a8d9610534b.tar.bz2
re PR c++/27315 (ICE with ill-placed expression)
PR c++/27315 * pt.c (do_decl_instantiation): Return early on invalid decl. * g++.dg/template/operator6.C: New test. * g++.dg/template/incomplete3.C: New test. From-SVN: r113778
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 739f0e1..f34ea88 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/27315
+ * pt.c (do_decl_instantiation): Return early on invalid decl.
+
PR c++/27559
* pt.c (push_template_decl_real): Return error_mark_node instead
of broken decl.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index bcf2096..cf0e7cd 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -11215,7 +11215,7 @@ do_decl_instantiation (tree decl, tree storage)
tree result = NULL_TREE;
int extern_p = 0;
- if (!decl)
+ if (!decl || decl == error_mark_node)
/* An error occurred, for which grokdeclarator has already issued
an appropriate message. */
return;