OSDN Git Service

* pt.c (tsubst_aggr_type): Check TYPE_P before tsubsting.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Sep 2011 17:11:20 +0000 (17:11 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Sep 2011 17:11:20 +0000 (17:11 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178650 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 2fe60fe..6d8430e 100644 (file)
@@ -1,3 +1,7 @@
+2011-09-07  Jason Merrill  <jason@redhat.com>
+
+       * pt.c (tsubst_aggr_type): Check TYPE_P before tsubsting.
+
 2011-09-06  Jason Merrill  <jason@redhat.com>
 
        PR c++/50296
index 1f43ff1..d883c16 100644 (file)
@@ -9590,14 +9590,13 @@ tsubst_aggr_type (tree t,
          /* First, determine the context for the type we are looking
             up.  */
          context = TYPE_CONTEXT (t);
-         if (context)
+         if (context && TYPE_P (context))
            {
              context = tsubst_aggr_type (context, args, complain,
                                          in_decl, /*entering_scope=*/1);
              /* If context is a nested class inside a class template,
                 it may still need to be instantiated (c++/33959).  */
-             if (TYPE_P (context))
-               context = complete_type (context);
+             context = complete_type (context);
            }
 
          /* Then, figure out what arguments are appropriate for the