https://gcc.gnu.org/g:bbd00cd05d390f69f2dbfa8bcac12b9ef4d63e30

commit r16-4051-gbbd00cd05d390f69f2dbfa8bcac12b9ef4d63e30
Author: Piotr Trojanek <troja...@adacore.com>
Date:   Wed Sep 10 19:12:22 2025 +0200

    ada: Include finally statements in debug pretty-printing
    
    Handled sequence of statements now includes optional finally statements.
    
    gcc/ada/ChangeLog:
    
            * sprint.adb (Sprint_Node_Actual): Print finally statements, if
            present.

Diff:
---
 gcc/ada/sprint.adb | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 7a9749287af8..f5caa3d1b78d 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -2190,6 +2190,13 @@ package body Sprint is
                Indent_End;
             end if;
 
+            if Present (Finally_Statements (Node)) then
+               Write_Indent_Str ("finally");
+               Indent_Begin;
+               Sprint_Node_List (Finally_Statements (Node));
+               Indent_End;
+            end if;
+
             Sprint_At_End_Proc (Node);
 
          when N_Identifier =>

Reply via email to