aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_names.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/sem_names.adb')
-rw-r--r--src/vhdl/sem_names.adb12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index 26672b385..0d03b8d4f 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -386,7 +386,13 @@ package body Sem_Names is
| Iir_Kind_For_Generate_Statement =>
null;
when Iir_Kind_Package_Declaration =>
- null;
+ declare
+ Header : constant Iir := Get_Package_Header (Decl);
+ begin
+ if Is_Valid (Header) then
+ Iterator_Decl_Chain (Get_Generic_Chain (Header), Id);
+ end if;
+ end;
when Iir_Kind_Package_Instantiation_Declaration
| Iir_Kind_Interface_Package_Declaration =>
Iterator_Decl_Chain (Get_Generic_Chain (Decl), Id);
@@ -2116,6 +2122,7 @@ package body Sem_Names is
-- LRM93 §6.3
-- This form of expanded name is only allowed within the
-- construct itself.
+ -- FIXME: LRM08 12.3 Visibility h)
if not Kind_In (Prefix,
Iir_Kind_Package_Declaration,
Iir_Kind_Package_Instantiation_Declaration)
@@ -2645,7 +2652,8 @@ package body Sem_Names is
when Iir_Kind_Procedure_Declaration
| Iir_Kind_Interface_Procedure_Declaration =>
- Error_Msg_Sem (+Name, "function name is a procedure");
+ Error_Msg_Sem (+Name, "cannot call %n in an expression",
+ +Prefix);
when Iir_Kinds_Process_Statement
| Iir_Kind_Component_Declaration