From: Ronan Desplanques Date: Thu, 17 Apr 2025 08:02:01 +0000 (+0200) Subject: ada: Tweak handling of Parent field in Print_Node X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1666d00bfbfe226948d147b6d561e6294227070e;p=thirdparty%2Fgcc.git ada: Tweak handling of Parent field in Print_Node Before this patch, Print_Node failed to honor its Prefix_Char formal parameter when printing the Parent field. This had no consequences because Prefix_Char was only used to print members of Nlists, and those don't have a parent in the tree. But this patch fixes it anyway in preparation for new debug printing features. gcc/ada/ChangeLog: * treepr.adb (Print_Node): Tweak Parent field printing. --- diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb index 16e2bc8ade5..0f723ed25b2 100644 --- a/gcc/ada/treepr.adb +++ b/gcc/ada/treepr.adb @@ -1144,8 +1144,8 @@ package body Treepr is end if; if not Is_List_Member (N) then - Print_Str (Prefix_Str); - Print_Str (" Parent = "); + Print_Str (Prefix); + Print_Str ("Parent = "); Print_Node_Ref (Parent (N)); Print_Eol; end if;