aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-09-23 09:11:08 +0200
committerTristan Gingold <tgingold@free.fr>2017-09-25 18:32:45 +0200
commit6a82fea317eaa9befab7e8d5c78d4cb2ea5b7fdf (patch)
treef8df7268172e87c296c5fce7b0fdf0d701e016a9 /src
parentaebedcd4fd4183aaecaf7bc82b1345b6fd40bfc5 (diff)
downloadghdl-6a82fea317eaa9befab7e8d5c78d4cb2ea5b7fdf.tar.gz
ghdl-6a82fea317eaa9befab7e8d5c78d4cb2ea5b7fdf.tar.bz2
ghdl-6a82fea317eaa9befab7e8d5c78d4cb2ea5b7fdf.zip
sem_assoc: handle anonymous interface.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/sem_scopes.adb12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vhdl/sem_scopes.adb b/src/vhdl/sem_scopes.adb
index 91408554b..d1f71a49b 100644
--- a/src/vhdl/sem_scopes.adb
+++ b/src/vhdl/sem_scopes.adb
@@ -1171,11 +1171,19 @@ package body Sem_Scopes is
procedure Add_Declarations_From_Interface_Chain (Chain : Iir)
is
- El: Iir;
+ El : Iir;
+ Id : Name_Id;
begin
El := Chain;
while El /= Null_Iir loop
- Add_Name (El, Get_Identifier (El), False);
+ Id := Get_Identifier (El);
+
+ -- The chain may be from an implicitely declared subprograms, with
+ -- anonymous identifiers. In that case, all interfaces are
+ -- anonymous and there is no need to iterate.
+ exit when Id = Null_Identifier;
+
+ Add_Name (El, Id, False);
El := Get_Chain (El);
end loop;
end Add_Declarations_From_Interface_Chain;