OSDN Git Service

* error.c (dump_function_decl): Don't crash on null DECL_NAME.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jul 2010 19:22:38 +0000 (19:22 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 6 Jul 2010 19:22:38 +0000 (19:22 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161878 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/error.c

index 85e8209..eb7a5ba 100644 (file)
@@ -1,3 +1,7 @@
+2010-07-06  Jason Merrill  <jason@redhat.com>
+
+       * error.c (dump_function_decl): Don't crash on null DECL_NAME.
+
 2010-07-06  Shujing Zhao  <pearly.zhao@oracle.com>
 
        * cp-tree.h (impl_conv_void): New type.
index 1902a13..cff822a 100644 (file)
@@ -1247,7 +1247,7 @@ dump_function_decl (tree t, int flags)
   tree exceptions;
   VEC(tree,gc) *typenames = NULL;
 
-  if (LAMBDA_FUNCTION_P (t))
+  if (DECL_NAME (t) && LAMBDA_FUNCTION_P (t))
     {
       /* A lambda's signature is essentially its "type", so defer.  */
       gcc_assert (LAMBDA_TYPE_P (DECL_CONTEXT (t)));