aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vhdl/vhdl-parse.adb3
-rw-r--r--src/vhdl/vhdl-sem_stmts.adb2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb
index e958b8f09..726e8e1f4 100644
--- a/src/vhdl/vhdl-parse.adb
+++ b/src/vhdl/vhdl-parse.adb
@@ -9617,6 +9617,9 @@ package body Vhdl.Parse is
return Res;
when Tok_Generic | Tok_Port =>
-- or a component instantiation.
+ if Get_Kind (Target) not in Iir_Kinds_Denoting_Name then
+ Error_Msg_Parse (+Target, "component name expected");
+ end if;
return Parse_Component_Instantiation (Target);
when others =>
-- Catch PSL clock declaration. Within comments, this is the
diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb
index 771a09c3a..8c16b6cea 100644
--- a/src/vhdl/vhdl-sem_stmts.adb
+++ b/src/vhdl/vhdl-sem_stmts.adb
@@ -1880,7 +1880,7 @@ package body Vhdl.Sem_Stmts is
-- Needs a denoting name
if Get_Kind (Inst) not in Iir_Kinds_Denoting_Name then
- Error_Msg_Sem (+Inst, "name for a component expected");
+ -- Error message already issued during parse.
return Null_Iir;
end if;