aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vhdl/sem_names.adb10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index fa8987d1a..0baf6c71d 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -1911,7 +1911,6 @@ package body Sem_Names is
R : Iir;
Se : Iir;
begin
- -- FIXME: if not is_expr (sub_name) return.
Name_Type := Get_Type (Sub_Name);
if Kind_In (Name_Type, Iir_Kind_Access_Type_Definition,
Iir_Kind_Access_Subtype_Definition)
@@ -2070,7 +2069,14 @@ package body Sem_Names is
for I in Natural loop
El := Get_Nth_Element (Prefix_List, I);
exit when El = Null_Iir;
- Sem_As_Selected_Element (El);
+ case Get_Kind (El) is
+ when Iir_Kind_Procedure_Declaration =>
+ -- A procedure cannot be the prefix of a selected
+ -- element.
+ null;
+ when others =>
+ Sem_As_Selected_Element (El);
+ end case;
end loop;
end if;
end;