From 6a82fea317eaa9befab7e8d5c78d4cb2ea5b7fdf Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 23 Sep 2017 09:11:08 +0200 Subject: sem_assoc: handle anonymous interface. --- src/vhdl/sem_scopes.adb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3