aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-10-12 05:44:33 +0200
committerTristan Gingold <tgingold@free.fr>2017-10-12 05:44:33 +0200
commit06b760a68cca65b63a23f336ec7829a8181add7b (patch)
tree41a7abd3454770fbfddc520641cf2a15568d599b
parentb6a3e375aefbb632223dcf775d47ab8a766867ab (diff)
downloadghdl-06b760a68cca65b63a23f336ec7829a8181add7b.tar.gz
ghdl-06b760a68cca65b63a23f336ec7829a8181add7b.tar.bz2
ghdl-06b760a68cca65b63a23f336ec7829a8181add7b.zip
Improve error message for bad interface (and fix a crash).
-rw-r--r--src/vhdl/sem_assocs.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vhdl/sem_assocs.adb b/src/vhdl/sem_assocs.adb
index 96db4c18b..483aafd58 100644
--- a/src/vhdl/sem_assocs.adb
+++ b/src/vhdl/sem_assocs.adb
@@ -2247,10 +2247,12 @@ package body Sem_Assocs is
end;
end if;
if Get_Kind (Inter) not in Iir_Kinds_Interface_Declaration
+ or else Interface_Chain = Null_Iir
or else Get_Parent (Inter) /= Get_Parent (Interface_Chain)
then
if Finish then
- Error_Msg_Sem (+Assoc, "formal is not an interface name");
+ Error_Msg_Sem
+ (+Assoc, "formal %i is not an interface name", +Inter);
end if;
Match := Not_Compatible;
exit;