From 52168ebce2bee72c122e5e4661c201664b5f3b8b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 16 Dec 2022 07:29:08 +0100 Subject: vhdl/translate/ortho_front.adb: avoid crash after errors. Fix #2271 --- src/vhdl/translate/ortho_front.adb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 -- cgit v1.2.3