aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_specs.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/vhdl-sem_specs.adb')
-rw-r--r--src/vhdl/vhdl-sem_specs.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_specs.adb b/src/vhdl/vhdl-sem_specs.adb
index 9418fb9de..e75c786fb 100644
--- a/src/vhdl/vhdl-sem_specs.adb
+++ b/src/vhdl/vhdl-sem_specs.adb
@@ -1268,7 +1268,11 @@ package body Vhdl.Sem_Specs is
if Is_Error (Entity_Name) then
return Null_Iir;
end if;
- Entity_Name := Sem_Denoting_Name (Get_Entity_Name (Aspect));
+ if Get_Kind (Entity_Name) not in Iir_Kinds_Denoting_Name then
+ Error_Msg_Sem (+Entity_Name, "name of an entity expected");
+ return Null_Iir;
+ end if;
+ Entity_Name := Sem_Denoting_Name (Entity_Name);
Set_Entity_Name (Aspect, Entity_Name);
Entity := Get_Named_Entity (Entity_Name);
if Entity = Error_Mark then