aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_names.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/vhdl-sem_names.adb')
-rw-r--r--src/vhdl/vhdl-sem_names.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb
index b02fdedd4..ebed95997 100644
--- a/src/vhdl/vhdl-sem_names.adb
+++ b/src/vhdl/vhdl-sem_names.adb
@@ -962,6 +962,7 @@ package body Vhdl.Sem_Names is
Parent : Iir;
begin
if Get_Kind (Base) in Iir_Kinds_Dereference then
+ -- A dereferenced object is never static.
return None;
end if;
@@ -1039,6 +1040,11 @@ package body Vhdl.Sem_Names is
then
Prefix := Function_Declaration_To_Call (Prefix);
end if;
+ if not Is_Object_Name (Prefix) then
+ Error_Msg_Sem_Relaxed
+ (Attr, Warnid_Attribute,
+ "prefix of array attribute must be an object name");
+ end if;
end if;
Set_Prefix (Attr, Prefix);