Commit 0856b5d7 by Jason Merrill Committed by Jason Merrill

Improve C++ debug_tree.

	* ptree.c (cxx_print_type): Print args of
	BOUND_TEMPLATE_TEMPLATE_PARM.
	(cxx_print_decl): Print DECL_TEMPLATE_PARMS.

From-SVN: r243865
parent 0bcd172d
2016-12-21 Jason Merrill <jason@redhat.com> 2016-12-21 Jason Merrill <jason@redhat.com>
* ptree.c (cxx_print_type): Print args of
BOUND_TEMPLATE_TEMPLATE_PARM.
(cxx_print_decl): Print DECL_TEMPLATE_PARMS.
PR c++/78767 - ICE with inherited constructor default argument PR c++/78767 - ICE with inherited constructor default argument
* method.c (strip_inheriting_ctors): Strip template as appropriate. * method.c (strip_inheriting_ctors): Strip template as appropriate.
......
...@@ -50,6 +50,7 @@ cxx_print_decl (FILE *file, tree node, int indent) ...@@ -50,6 +50,7 @@ cxx_print_decl (FILE *file, tree node, int indent)
} }
else if (TREE_CODE (node) == TEMPLATE_DECL) else if (TREE_CODE (node) == TEMPLATE_DECL)
{ {
print_node (file, "parms", DECL_TEMPLATE_PARMS (node), indent + 4);
indent_to (file, indent + 3); indent_to (file, indent + 3);
fprintf (file, " full-name \"%s\"", fprintf (file, " full-name \"%s\"",
decl_as_string (node, TFF_TEMPLATE_HEADER)); decl_as_string (node, TFF_TEMPLATE_HEADER));
...@@ -73,9 +74,12 @@ cxx_print_type (FILE *file, tree node, int indent) ...@@ -73,9 +74,12 @@ cxx_print_type (FILE *file, tree node, int indent)
{ {
switch (TREE_CODE (node)) switch (TREE_CODE (node))
{ {
case BOUND_TEMPLATE_TEMPLATE_PARM:
print_node (file, "args", TYPE_TI_ARGS (node), indent + 4);
gcc_fallthrough ();
case TEMPLATE_TYPE_PARM: case TEMPLATE_TYPE_PARM:
case TEMPLATE_TEMPLATE_PARM: case TEMPLATE_TEMPLATE_PARM:
case BOUND_TEMPLATE_TEMPLATE_PARM:
indent_to (file, indent + 3); indent_to (file, indent + 3);
fprintf (file, "index %d level %d orig_level %d", fprintf (file, "index %d level %d orig_level %d",
TEMPLATE_TYPE_IDX (node), TEMPLATE_TYPE_LEVEL (node), TEMPLATE_TYPE_IDX (node), TEMPLATE_TYPE_LEVEL (node),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment