aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-10-26 19:14:28 +0200
committerTristan Gingold <tgingold@free.fr>2018-10-26 19:14:28 +0200
commitee8689bda870df92d6d18066764fc8d319b1380b (patch)
treea06753652ce02ead131dc53a6a4ee8420f405f66 /src/ortho
parenta45d79eb68816e6ec79ce228ed144419c46c8fe3 (diff)
downloadghdl-ee8689bda870df92d6d18066764fc8d319b1380b.tar.gz
ghdl-ee8689bda870df92d6d18066764fc8d319b1380b.tar.bz2
ghdl-ee8689bda870df92d6d18066764fc8d319b1380b.zip
ortho_debug: fix disp for empty loop.
Diffstat (limited to 'src/ortho')
-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");