From: Paolo Carlini Date: Wed, 8 Jun 2016 18:29:42 +0000 (+0000) Subject: pt.c (tsubst, [...]): Don't delay checking the return value of tsubst_aggr_type for... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f07063cc7a060dd1148a8540e689c1162bfe35e4;p=gcc.git pt.c (tsubst, [...]): Don't delay checking the return value of tsubst_aggr_type for error_mark_node. 2016-06-08 Paolo Carlini * pt.c (tsubst, case TYPENAME_TYPE): Don't delay checking the return value of tsubst_aggr_type for error_mark_node. From-SVN: r237236 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1627fd214c0..55b473e0dcc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2016-06-08 Paolo Carlini + + * 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 PR c++/71442 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 4ccdd45b73b..3a3d9b8f439 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))