From f1ddf165155bd6f9d2ebfe10d08c7988927c4ba3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 16 Mar 2016 05:08:28 +0100 Subject: translation: avoid memory leak while allocating ports. Issue found in bug040. --- src/vhdl/translate/trans-chap4.ads | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/vhdl/translate/trans-chap4.ads') diff --git a/src/vhdl/translate/trans-chap4.ads b/src/vhdl/translate/trans-chap4.ads index 317d10342..d91f0ee52 100644 --- a/src/vhdl/translate/trans-chap4.ads +++ b/src/vhdl/translate/trans-chap4.ads @@ -68,7 +68,10 @@ package Trans.Chap4 is procedure Translate_Generic_Chain (Parent : Iir); -- Elaborate signal subtypes and allocate the storage for the object. - procedure Elab_Signal_Declaration_Storage (Decl : Iir); + -- If HAS_COPY is true, do not allocate storage for values, as the values + -- will be directly referenced from the association. + procedure Elab_Signal_Declaration_Storage + (Decl : Iir; Has_Copy : Boolean); -- Create signal object. -- Note: SIG can be a signal sub-element (used when signals are -- cgit v1.2.3