aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/debug/ortho_debug-disp.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/ortho/debug/ortho_debug-disp.adb')
-rw-r--r--src/ortho/debug/ortho_debug-disp.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ortho/debug/ortho_debug-disp.adb b/src/ortho/debug/ortho_debug-disp.adb
index a45bceca9..e2e5793f9 100644
--- a/src/ortho/debug/ortho_debug-disp.adb
+++ b/src/ortho/debug/ortho_debug-disp.adb
@@ -1108,7 +1108,10 @@ package body Ortho_Debug.Disp is
Disp_Loop_Name (Stmt);
Put_Line (":");
Add_Tab;
- Disp_Snode (Stmt.Next, Stmt.Loop_Last);
+ if Stmt.Loop_Last /= Stmt then
+ -- Only if the loop is not empty.
+ Disp_Snode (Stmt.Next, Stmt.Loop_Last);
+ end if;
Stmt := Stmt.Loop_Last;
Rem_Tab;
Put_Keyword ("end");