aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/errorout.adb4
-rw-r--r--src/ghdldrv/ghdlsynth.adb2
-rw-r--r--src/synth/synthesis.adb2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/errorout.adb b/src/errorout.adb
index d3eea84c3..ab05c956a 100644
--- a/src/errorout.adb
+++ b/src/errorout.adb
@@ -229,7 +229,9 @@ package body Errorout is
procedure Register_Earg_Handler
(Kind : Earg_Kind; Handler : Earg_Handler) is
begin
- if Lang_Handlers (Kind) /= null then
+ if Lang_Handlers (Kind) /= null
+ and then Lang_Handlers (Kind) /= Handler
+ then
-- Cannot change handler.
raise Internal_Error;
end if;
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb
index 27af66d97..27694e26e 100644
--- a/src/ghdldrv/ghdlsynth.adb
+++ b/src/ghdldrv/ghdlsynth.adb
@@ -42,6 +42,7 @@ with Vhdl.Utils;
with Netlists.Dump;
with Netlists.Disp_Vhdl;
+with Netlists.Errors;
with Synthesis;
with Synth.Disp_Vhdl;
@@ -350,5 +351,6 @@ package body Ghdlsynth is
Ghdlsynth.Register_Commands;
Options.Initialize;
Errorout.Console.Install_Handler;
+ Netlists.Errors.Initialize;
end Init_For_Ghdl_Synth;
end Ghdlsynth;
diff --git a/src/synth/synthesis.adb b/src/synth/synthesis.adb
index d5dcf61fd..5d41ad70f 100644
--- a/src/synth/synthesis.adb
+++ b/src/synth/synthesis.adb
@@ -20,7 +20,6 @@
with Vhdl.Utils; use Vhdl.Utils;
-with Netlists.Errors;
with Synth.Values; use Synth.Values;
with Synth.Decls; use Synth.Decls;
with Synth.Insts; use Synth.Insts;
@@ -128,7 +127,6 @@ package body Synthesis is
Top_Instance := Make_Base_Instance;
- Netlists.Errors.Initialize;
Synth.Values.Init;
Synth.Insts.Init;