From 074e960162d98017f14a2fe9e41c5c3b0a0a68a1 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 12 Apr 2020 16:43:03 +0200 Subject: vhdl: avoid a crash in case of outdated package body. --- src/vhdl/vhdl-configuration.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vhdl/vhdl-configuration.adb b/src/vhdl/vhdl-configuration.adb index 8865b0ae3..d2cdfb9ff 100644 --- a/src/vhdl/vhdl-configuration.adb +++ b/src/vhdl/vhdl-configuration.adb @@ -207,7 +207,9 @@ package body Vhdl.Configuration is Error_Msg_Elab (Lib_Unit, "body of %n was never analyzed", +Lib_Unit); elsif Get_Date (Bod) < Get_Date (Unit) then - Error_Msg_Elab (Bod, "%n is outdated", +Bod); + -- Cannot use BOD as location, as the location may not + -- exist. + Error_Msg_Elab (Lib_Unit, "%n is outdated", +Bod); Bod := Null_Iir; end if; end if; -- cgit v1.2.3