aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2016-06-08 18:29:42 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2016-06-08 18:29:42 +0000
commitf07063cc7a060dd1148a8540e689c1162bfe35e4 (patch)
treee69528a84bccbdc647f2b84bd1ce0142769f0ae3
parent2ef16b6eb25b29ae3790ab39162d1d6df3ccf284 (diff)
downloadgcc-f07063cc7a060dd1148a8540e689c1162bfe35e4.zip
gcc-f07063cc7a060dd1148a8540e689c1162bfe35e4.tar.gz
gcc-f07063cc7a060dd1148a8540e689c1162bfe35e4.tar.bz2
pt.c (tsubst, [...]): Don't delay checking the return value of tsubst_aggr_type for error_mark_node.
2016-06-08 Paolo Carlini <paolo.carlini@oracle.com> * pt.c (tsubst, case TYPENAME_TYPE): Don't delay checking the return value of tsubst_aggr_type for error_mark_node. From-SVN: r237236
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1627fd2..55b473e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * pt.c (tsubst, case TYPENAME_TYPE): Don't delay checking the
+ return value of tsubst_aggr_type for error_mark_node.
+
2016-06-08 Jakub Jelinek <jakub@redhat.com>
PR c++/71442
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 4ccdd45..3a3d9b8 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -13430,10 +13430,12 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
{
tree ctx = tsubst_aggr_type (TYPE_CONTEXT (t), args, complain,
in_decl, /*entering_scope=*/1);
+ if (ctx == error_mark_node)
+ return error_mark_node;
+
tree f = tsubst_copy (TYPENAME_TYPE_FULLNAME (t), args,
complain, in_decl);
-
- if (ctx == error_mark_node || f == error_mark_node)
+ if (f == error_mark_node)
return error_mark_node;
if (!MAYBE_CLASS_TYPE_P (ctx))