aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 07b9c7e..af7f0c0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-15 Steve Ellcey <sje@cup.hp.com>
+
+ PR c++/38357
+ * pt.c (tsubst): Check for NULL args.
+
2009-01-15 Dodji Seketeli <dodji@redhat.com>
PR c++/38636
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index de70e53..0618fe2 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -8975,6 +8975,9 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
if (DECL_P (t))
return tsubst_decl (t, args, complain);
+ if (args == NULL_TREE)
+ return t;
+
if (TREE_CODE (t) == IDENTIFIER_NODE)
type = IDENTIFIER_TYPE_VALUE (t);
else