diff mbox

C++ PATCH to cp_common_init_ts to fix crash in print_node

Message ID 4DDD1019.2020309@redhat.com
State New
Headers show

Commit Message

Jason Merrill May 25, 2011, 2:20 p.m. UTC
Trying to print a TYPE_ARGUMENT_PACK in the debugger with debug_tree 
crashes because print_node assumes that all types have TS_COMMON.  Fixed 
thus.

Tested x86_64-pc-linux-gnu, applying to trunk as obvious.
diff mbox

Patch

commit 7e5c923a908bffb2d8f8404f6cc7fd81a85bf932
Author: Jason Merrill <jason@redhat.com>
Date:   Tue May 24 23:16:23 2011 -0400

    	* cp-objcp-common.c (cp_common_init_ts): TYPE_ARGUMENT_PACK has
    	TS_COMMON.

diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index ed85491..df6b1dd 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -241,6 +241,7 @@  cp_common_init_ts (void)
   MARK_TS_COMMON (UNDERLYING_TYPE);
   MARK_TS_COMMON (BASELINK);
   MARK_TS_COMMON (TYPE_PACK_EXPANSION);
+  MARK_TS_COMMON (TYPE_ARGUMENT_PACK);
   MARK_TS_COMMON (DECLTYPE_TYPE);
   MARK_TS_COMMON (BOUND_TEMPLATE_TEMPLATE_PARM);
   MARK_TS_COMMON (UNBOUND_CLASS_TEMPLATE);