diff options
author | Jason Merrill <jason@redhat.com> | 2011-09-07 13:11:20 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-09-07 13:11:20 -0400 |
commit | 10e8dd82753c1b5a864bc5a28c77ddd037528578 (patch) | |
tree | 4187c96167013efa29c093b727c7b4b5385b429b /gcc | |
parent | aad0eef6aaf3de8c9fbd5edb3b5fd31161b52dda (diff) | |
download | gcc-10e8dd82753c1b5a864bc5a28c77ddd037528578.zip gcc-10e8dd82753c1b5a864bc5a28c77ddd037528578.tar.gz gcc-10e8dd82753c1b5a864bc5a28c77ddd037528578.tar.bz2 |
* pt.c (tsubst_aggr_type): Check TYPE_P before tsubsting.
From-SVN: r178650
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2fe60fe..6d8430e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 1f43ff1..d883c16 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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 |