diff options
-rw-r--r-- | src/ghdldrv/ghdlcomp.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-configuration.adb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index 560a5ffd2..c58360aee 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -326,7 +326,9 @@ package body Ghdlcomp is Flags.Flag_Elaborate := True; Config := Vhdl.Configuration.Configure (Prim_Id, Sec_Id); - if Config = Null_Iir then + if Config = Null_Iir + or else Errorout.Nbr_Errors > 0 + then raise Compilation_Error; end if; diff --git a/src/vhdl/vhdl-configuration.adb b/src/vhdl/vhdl-configuration.adb index ad3fdc6a1..0f5c63b62 100644 --- a/src/vhdl/vhdl-configuration.adb +++ b/src/vhdl/vhdl-configuration.adb @@ -162,7 +162,9 @@ package body Vhdl.Configuration is Add_Design_Block_Configuration (Blk); Current_Configuration := Prev_Configuration; Arch := Strip_Denoting_Name (Get_Block_Specification (Blk)); - Add_Design_Unit (Get_Design_Unit (Arch), Loc); + if Arch /= Null_Iir then + Add_Design_Unit (Get_Design_Unit (Arch), Loc); + end if; end; when Iir_Kind_Architecture_Body => -- Add entity |