From: H.J. Lu Date: Tue, 1 Jul 2025 00:14:09 +0000 (+0800) Subject: Fix "void debug (const tree_node *ptr)" X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76671eb3142f9827691fcb08ca7938624221104e;p=thirdparty%2Fgcc.git Fix "void debug (const tree_node *ptr)" Calling "debug (const tree_node *ptr)" does nothing. Change it to call debug_tree so that we can do this in gdb: (gdb) whatis type type = const_tree (gdb) call debug (type) constant 32> unit-size constant 4> align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffe982f2a0 precision:32 pointer_to_this > (gdb) PR debug/120902 * print-tree.cc (debug with const tree_node *): Call debug_tree instead of debug. Signed-off-by: H.J. Lu --- diff --git a/gcc/print-tree.cc b/gcc/print-tree.cc index 6ec96f0ba17..f84be762741 100644 --- a/gcc/print-tree.cc +++ b/gcc/print-tree.cc @@ -1193,7 +1193,7 @@ DEBUG_FUNCTION void debug (const tree_node *ptr) { if (ptr) - debug (*ptr); + debug_tree (const_cast (ptr)); else fprintf (stderr, "\n"); }