summaryrefslogtreecommitdiff
path: root/src/vhdl/translate/trans-chap5.adb
diff options
context:
space:
mode:
authorTristan Gingold2015-09-03 20:20:24 +0200
committerTristan Gingold2015-09-03 20:20:24 +0200
commit2d8f611cb63b72aa0373efe0ffa0df47e25519c9 (patch)
tree50d675079beccf64f6856193266cce9508fff0a0 /src/vhdl/translate/trans-chap5.adb
parent26af2bf1ad5f949e05d0e3ac560bbd22e41d7158 (diff)
downloadghdl-2d8f611cb63b72aa0373efe0ffa0df47e25519c9.tar.gz
ghdl-2d8f611cb63b72aa0373efe0ffa0df47e25519c9.tar.bz2
ghdl-2d8f611cb63b72aa0373efe0ffa0df47e25519c9.zip
Adjust previous patch (destroy types for default port values).
Diffstat (limited to 'src/vhdl/translate/trans-chap5.adb')
-rw-r--r--src/vhdl/translate/trans-chap5.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vhdl/translate/trans-chap5.adb b/src/vhdl/translate/trans-chap5.adb
index 7897d8e..47950b7 100644
--- a/src/vhdl/translate/trans-chap5.adb
+++ b/src/vhdl/translate/trans-chap5.adb
@@ -643,18 +643,18 @@ package body Trans.Chap5 is
end if;
when Iir_Kind_Association_Element_Open =>
declare
- Actual_Type : Iir;
+ Value : constant Iir := Get_Default_Value (Formal_Base);
+ Actual_Type : constant Iir := Get_Type (Value);
Bounds : Mnode;
Formal_Node : Mnode;
begin
- Actual_Type :=
- Get_Type (Get_Default_Value (Formal_Base));
Chap3.Create_Array_Subtype (Actual_Type);
Bounds := Chap3.Get_Array_Type_Bounds (Actual_Type);
Formal_Node := Chap6.Translate_Name (Formal);
New_Assign_Stmt
(M2Lp (Chap3.Get_Array_Bounds (Formal_Node)),
M2Addr (Bounds));
+ Chap9.Destroy_Types (Value);
end;
when Iir_Kind_Association_Element_By_Individual =>
declare