pt.c (tsubst, [...]): Don't delay checking the return value of tsubst_aggr_type for...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 8 Jun 2016 18:29:42 +0000 (18:29 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 8 Jun 2016 18:29:42 +0000 (18:29 +0000)
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

gcc/cp/ChangeLog
gcc/cp/pt.c

index 1627fd214c0d7e90ea2abc2d2118890ce669909a..55b473e0dcc02de2d5eceef677e3d5e6d76e7f5d 100644 (file)
@@ -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
index 4ccdd45b73b971eb97a7a07a2ac94f07abb54d11..3a3d9b8f4396be0c3593f6bedb4450ea5faec154 100644 (file)
@@ -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))