summaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-06 15:19:11 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-06 15:19:11 +0000
commit1993ca9094be17cc3b558c45ce85415f87ab21d4 (patch)
treee581f1f6366f4843d8c124abb850c7c4d9fe8a61 /gcc/cp/tree.c
parent9618cef10cf5822dc3f72363d27f94606942939f (diff)
downloadgcc-1993ca9094be17cc3b558c45ce85415f87ab21d4.tar.gz
PR c++/56543
* tree.c (strip_typedefs): Don't copy args if they are NULL. * g++.dg/template/typename20.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196491 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 75b4d5121ed..b57b44ad149 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1222,7 +1222,8 @@ strip_typedefs (tree t)
case TYPENAME_TYPE:
{
tree fullname = TYPENAME_TYPE_FULLNAME (t);
- if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR)
+ if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR
+ && TREE_OPERAND (fullname, 1))
{
tree args = TREE_OPERAND (fullname, 1);
tree new_args = copy_node (args);