aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_decls.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-10-24 06:20:29 +0200
committerTristan Gingold <tgingold@free.fr>2017-10-24 06:20:29 +0200
commitff13d4486589935979bd3b1799e1b226e6a149a4 (patch)
treedd4c9f62dcb0d93181f85e679ef7b26d642b0c84 /src/vhdl/sem_decls.adb
parent09a8b72257bc6f33fd2ee89c3418d8bcee6e05e6 (diff)
downloadghdl-ff13d4486589935979bd3b1799e1b226e6a149a4.tar.gz
ghdl-ff13d4486589935979bd3b1799e1b226e6a149a4.tar.bz2
ghdl-ff13d4486589935979bd3b1799e1b226e6a149a4.zip
Make interface subprogram visible in the package declaration.
Supports alias of interface subprograms.
Diffstat (limited to 'src/vhdl/sem_decls.adb')
-rw-r--r--src/vhdl/sem_decls.adb11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vhdl/sem_decls.adb b/src/vhdl/sem_decls.adb
index 2da398ee9..ca1351720 100644
--- a/src/vhdl/sem_decls.adb
+++ b/src/vhdl/sem_decls.adb
@@ -490,6 +490,7 @@ package body Sem_Decls is
procedure Sem_Interface_Subprogram_Declaration (Inter : Iir) is
begin
Sem_Subprogram_Specification (Inter);
+ Sem_Scopes.Add_Name (Inter);
Xref_Decl (Inter);
end Sem_Interface_Subprogram_Declaration;
@@ -2266,7 +2267,8 @@ package body Sem_Decls is
return List = Null_Iir_List
and then Get_Type (N_Entity)
= Get_Type (Get_Return_Type_Mark (Sig));
- when Iir_Kind_Function_Declaration =>
+ when Iir_Kind_Function_Declaration
+ | Iir_Kind_Interface_Function_Declaration =>
-- LRM93 2.3.2 Signatures
-- * if the reserved word RETURN is present, the subprogram is
-- a function and the base type of the type mark following
@@ -2280,7 +2282,8 @@ package body Sem_Decls is
then
return False;
end if;
- when Iir_Kind_Procedure_Declaration =>
+ when Iir_Kind_Procedure_Declaration
+ | Iir_Kind_Interface_Procedure_Declaration =>
-- LRM93 2.3.2 Signatures
-- * [...] or the reserved word RETURN is absent and the
-- subprogram is a procedure.
@@ -2547,8 +2550,8 @@ package body Sem_Decls is
Id : Name_Id;
begin
case Get_Kind (N_Entity) is
- when Iir_Kind_Function_Declaration
- | Iir_Kind_Procedure_Declaration =>
+ when Iir_Kinds_Subprogram_Declaration
+ | Iir_Kinds_Interface_Subprogram_Declaration =>
-- LRM93 4.3.3.2 Non-Object Aliases
-- 2. A signature is required if the name denotes a subprogram
-- (including an operator) or enumeration literal.