diff options
author | Steve Ellcey <sje@cup.hp.com> | 2009-01-15 18:07:46 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2009-01-15 18:07:46 +0000 |
commit | 5fa0e8530e447068cb120d9e6e2fe0d7f42dc37c (patch) | |
tree | 3a8110dd78b44f23f2f1d353db251bb52b0d300d /gcc | |
parent | e939805b7bf63bec46a4b2de6f272d3f77238448 (diff) | |
download | gcc-5fa0e8530e447068cb120d9e6e2fe0d7f42dc37c.zip gcc-5fa0e8530e447068cb120d9e6e2fe0d7f42dc37c.tar.gz gcc-5fa0e8530e447068cb120d9e6e2fe0d7f42dc37c.tar.bz2 |
re PR c++/38357 (ICE cc1plus (Segmentation fault))
PR c++/38357
* pt.c (tsubst): Check for NULL args.
From-SVN: r143402
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 3 |
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 |