From e6a26cc19e4c3f5b48ece9a0ad570c698b83a00d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 28 May 2021 20:38:38 +0200 Subject: vhdl-sem_stmts.adb: avoid duplicate error message --- src/vhdl/vhdl-sem_stmts.adb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vhdl') diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb index b52476f9b..dfe49cfd2 100644 --- a/src/vhdl/vhdl-sem_stmts.adb +++ b/src/vhdl/vhdl-sem_stmts.adb @@ -1878,6 +1878,9 @@ package body Vhdl.Sem_Stmts is Comp_Name := Sem_Denoting_Name (Inst); Set_Instantiated_Unit (Stmt, Comp_Name); Comp := Get_Named_Entity (Comp_Name); + if Is_Error (Comp) then + return Null_Iir; + end if; if Get_Kind (Comp) /= Iir_Kind_Component_Declaration then Error_Class_Match (Comp_Name, "component"); return Null_Iir; -- cgit v1.2.3