OSDN Git Service

PR c++/53209
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 May 2012 04:25:25 +0000 (04:25 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 May 2012 04:25:25 +0000 (04:25 +0000)
* pt.c (tsubst_decl): Bail out if argvec is error_mark_node.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@187497 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 77ea188..00af353 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-15  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR c++/53209
+       * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
+
 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/53301
index 383f0d6..e3d8948 100644 (file)
@@ -10668,6 +10668,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain)
                tmpl = DECL_TI_TEMPLATE (t);
                gen_tmpl = most_general_template (tmpl);
                argvec = tsubst (DECL_TI_ARGS (t), args, complain, in_decl);
+               if (argvec == error_mark_node)
+                 RETURN (error_mark_node);
                hash = hash_tmpl_and_args (gen_tmpl, argvec);
                spec = retrieve_specialization (gen_tmpl, argvec, hash);
              }