diff options
author | Jason Merrill <jason@redhat.com> | 2009-09-28 14:21:17 +0000 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2009-09-28 14:21:17 +0000 |
commit | 177261e411f071832c7b537e7c795f5a41e4779e (patch) | |
tree | d40ec76646181bcbe101e9faebfb724a48b5178f | |
parent | 8e08f5bf31b9338198df8488a87e170e05ae3e9b (diff) |
avoid crash on lambda in template static data member initializer
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/cxx0x-lambdas-branch@152237 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/pt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index af829e3cbf0..89498a4f31e 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -297,7 +297,7 @@ get_template_info (const_tree t) if (DECL_P (t) && DECL_LANG_SPECIFIC (t)) tinfo = DECL_TEMPLATE_INFO (t); - if (!tinfo && TREE_CODE (t) == TYPE_DECL) + if (!tinfo && DECL_IMPLICIT_TYPEDEF_P (t)) t = TREE_TYPE (t); if (TAGGED_TYPE_P (t)) @@ -4212,7 +4212,7 @@ push_template_decl_real (tree decl, bool is_friend) if (!ctx || TREE_CODE (ctx) == FUNCTION_DECL - || (CLASS_TYPE_P (ctx) && TYPE_BEING_DEFINED (ctx)) + || (CLASS_TYPE_P (ctx) && !get_template_info (decl)) || (is_friend && !DECL_TEMPLATE_INFO (decl))) { if (DECL_LANG_SPECIFIC (decl) |