aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_inst.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-22 08:06:30 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-22 08:06:30 +0100
commit14c2ac2929a889a181cd43be40be6a364d11223f (patch)
tree51fd6a4cbf3b8f4f1a1d63ac34b637607d76bcf9 /src/vhdl/vhdl-sem_inst.adb
parent4ad3644e185ff5fcbee7f2a9e419c463e67513b4 (diff)
downloadghdl-14c2ac2929a889a181cd43be40be6a364d11223f.tar.gz
ghdl-14c2ac2929a889a181cd43be40be6a364d11223f.tar.bz2
ghdl-14c2ac2929a889a181cd43be40be6a364d11223f.zip
vhdl-sem_inst: recompute subprogram hash after instantiation.
Diffstat (limited to 'src/vhdl/vhdl-sem_inst.adb')
-rw-r--r--src/vhdl/vhdl-sem_inst.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_inst.adb b/src/vhdl/vhdl-sem_inst.adb
index 0611fc8f1..d920f4943 100644
--- a/src/vhdl/vhdl-sem_inst.adb
+++ b/src/vhdl/vhdl-sem_inst.adb
@@ -633,6 +633,12 @@ package body Vhdl.Sem_Inst is
-- incomplete type
-- attribute_value
+ if Get_Kind (Res) in Iir_Kinds_Subprogram_Declaration then
+ -- Recompute the hash as the interface may have
+ -- changed due to instantiation.
+ Sem_Utils.Compute_Subprogram_Hash (Res);
+ end if;
+
return Res;
end;
end Instantiate_Iir;