aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-12-16 07:29:08 +0100
committerTristan Gingold <tgingold@free.fr>2022-12-16 07:29:08 +0100
commit52168ebce2bee72c122e5e4661c201664b5f3b8b (patch)
tree866164a3b0a89facd7f2ecc6fe5d72f4ac646b93 /src/vhdl
parent8676f7d946c0c0f62359d34a52988aa74b2b949d (diff)
downloadghdl-52168ebce2bee72c122e5e4661c201664b5f3b8b.tar.gz
ghdl-52168ebce2bee72c122e5e4661c201664b5f3b8b.tar.bz2
ghdl-52168ebce2bee72c122e5e4661c201664b5f3b8b.zip
vhdl/translate/ortho_front.adb: avoid crash after errors.
Fix #2271
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/translate/ortho_front.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vhdl/translate/ortho_front.adb b/src/vhdl/translate/ortho_front.adb
index a1364a243..88effc3c1 100644
--- a/src/vhdl/translate/ortho_front.adb
+++ b/src/vhdl/translate/ortho_front.adb
@@ -643,6 +643,11 @@ package body Ortho_Front is
Flags.Flag_Only_Elab_Warnings := False;
Config := Vhdl.Configuration.Configure
(Elab_Library, Elab_Entity, Elab_Architecture);
+
+ if Errorout.Nbr_Errors > 0 then
+ raise Compilation_Error;
+ end if;
+
Translation.Elaborate (Config, True);
if Errorout.Nbr_Errors > 0 then