]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Tweak handling of Parent field in Print_Node
authorRonan Desplanques <desplanques@adacore.com>
Thu, 17 Apr 2025 08:02:01 +0000 (10:02 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 30 Jun 2025 13:47:19 +0000 (15:47 +0200)
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.

gcc/ada/treepr.adb

index 16e2bc8ade5b3d16c7b31d6a04218eee3f32b959..0f723ed25b24f32143d4f005ed4a15ed34ee71d1 100644 (file)
@@ -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;