aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/mcode/ortho_code-exprs.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-11-17 05:56:50 +0100
committerTristan Gingold <tgingold@free.fr>2014-11-17 05:56:50 +0100
commit56ab294531f7c12ae9407df88ec12c448e695e5a (patch)
treef182b3b7dac85e88ac277bc5b974fcf3f70f7cc7 /src/ortho/mcode/ortho_code-exprs.adb
parentf0fc4fdc5a5a2400a084a0bfe775550d3f816f60 (diff)
downloadghdl-56ab294531f7c12ae9407df88ec12c448e695e5a.tar.gz
ghdl-56ab294531f7c12ae9407df88ec12c448e695e5a.tar.bz2
ghdl-56ab294531f7c12ae9407df88ec12c448e695e5a.zip
ortho_mcode: add assertion.
Diffstat (limited to 'src/ortho/mcode/ortho_code-exprs.adb')
-rw-r--r--src/ortho/mcode/ortho_code-exprs.adb9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ortho/mcode/ortho_code-exprs.adb b/src/ortho/mcode/ortho_code-exprs.adb
index b2dfa1a67..9cfffd118 100644
--- a/src/ortho/mcode/ortho_code-exprs.adb
+++ b/src/ortho/mcode/ortho_code-exprs.adb
@@ -327,9 +327,12 @@ package body Ortho_Code.Exprs is
procedure Link_Stmt (Stmt : O_Enode) is
begin
- if Last_Stmt = O_Enode_Null then
- raise Program_Error;
- end if;
+ -- Expect a real statement.
+ pragma Assert (Stmt /= O_Enode_Null);
+
+ -- Must be withint a subprogram.
+ pragma Assert (Last_Stmt /= O_Enode_Null);
+
Set_Stmt_Link (Last_Stmt, Stmt);
Last_Stmt := Stmt;
end Link_Stmt;