diff options
| author | Tristan Gingold <tgingold@free.fr> | 2016-09-30 20:28:26 +0200 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2016-09-30 20:28:26 +0200 | 
| commit | c2c629ee080e5b7e45b35452c18658bc4ac36471 (patch) | |
| tree | 1487f875b2a1e329bb12b652a9bc7e4709ff2d60 /src | |
| parent | 57bd9ab4cb8b64fb320109cee94410fded6b43e3 (diff) | |
| download | ghdl-c2c629ee080e5b7e45b35452c18658bc4ac36471.tar.gz ghdl-c2c629ee080e5b7e45b35452c18658bc4ac36471.tar.bz2 ghdl-c2c629ee080e5b7e45b35452c18658bc4ac36471.zip  | |
association for subprograms: set use_flag.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vhdl/sem_assocs.adb | 11 | 
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vhdl/sem_assocs.adb b/src/vhdl/sem_assocs.adb index a2c45eeac..adae8b6b4 100644 --- a/src/vhdl/sem_assocs.adb +++ b/src/vhdl/sem_assocs.adb @@ -1620,6 +1620,7 @@ package body Sem_Assocs is              Res := Create_Iir (Iir_Kind_Association_Element_Subprogram);              Location_Copy (Res, Actual);              Set_Actual (Res, Build_Simple_Name (Decl, Get_Location (Actual))); +            Set_Use_Flag (Decl, True);              return Res;           end if;           Interp := Get_Next_Interpretation (Interp); @@ -1787,8 +1788,10 @@ package body Sem_Assocs is                 Error_Msg_Sem                   (+Assoc, "profile of %n doesn't match profile of %n",                    (+Actual, +Inter)); +               --  Explain                 Discard := Has_Interface_Subprogram_Profile                   (Inter, Res, Get_Location (Assoc)); +               return;              end if;           when Iir_Kind_Overload_List =>              declare @@ -1834,13 +1837,19 @@ package body Sem_Assocs is                            (+Assoc, " %n declared at %l", (+El, +El));                       end loop;                    end if; +                  return; +               elsif First_Error then +                  return;                 end if;                 Free_Overload_List (Res); -               Set_Named_Entity (Actual, R); +               Res := R;              end;           when others =>              Error_Kind ("sem_association_subprogram", Res);        end case; + +      Set_Named_Entity (Actual, Res); +      Set_Use_Flag (Res, True);     end Sem_Association_Subprogram;     --  Associate ASSOC with interface INTERFACE  | 
