diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2016-06-08 18:29:42 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2016-06-08 18:29:42 +0000 |
commit | f07063cc7a060dd1148a8540e689c1162bfe35e4 (patch) | |
tree | e69528a84bccbdc647f2b84bd1ce0142769f0ae3 | |
parent | 2ef16b6eb25b29ae3790ab39162d1d6df3ccf284 (diff) | |
download | gcc-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/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 6 |
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)) |