aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/translate/trans.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-07-17 08:35:04 +0200
committerTristan Gingold <tgingold@free.fr>2015-07-17 08:35:04 +0200
commit64fa65e1395bef4f05c51bc19d9a46d6003339ee (patch)
tree98537c3e9f945e85aaf116966a32b56a51d2dd39 /src/vhdl/translate/trans.ads
parentdb08111a55bff4fcee5f268b44e247e5332d1e69 (diff)
downloadghdl-64fa65e1395bef4f05c51bc19d9a46d6003339ee.tar.gz
ghdl-64fa65e1395bef4f05c51bc19d9a46d6003339ee.tar.bz2
ghdl-64fa65e1395bef4f05c51bc19d9a46d6003339ee.zip
Do not create a transient type for strings.
Diffstat (limited to 'src/vhdl/translate/trans.ads')
-rw-r--r--src/vhdl/translate/trans.ads10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vhdl/translate/trans.ads b/src/vhdl/translate/trans.ads
index 4e778de1b..8cf76b7de 100644
--- a/src/vhdl/translate/trans.ads
+++ b/src/vhdl/translate/trans.ads
@@ -1675,6 +1675,16 @@ package Trans is
-- FIXME: maybe a flag must be added to CLOSE_TEMP where it is known
-- stack2 can be released.
procedure Create_Temp_Stack2_Mark;
+
+ -- Some constructs (slices, aggregates) implicitly define a subtype.
+ -- This subtype (and its bounds) is created dynamically and its life
+ -- is short.
+ -- However, in some cases (default expression, target of signal
+ -- assignment) the construct may be evaluated several time (eg: to
+ -- compute the drivers). In that case, bounds are created many times
+ -- and therefore must be forgotten at the end of its life to avoid any
+ -- incorrect reuse.
+ --
-- Add ATYPE in the chain of types to be destroyed at the end of the
-- temp scope.
procedure Add_Transient_Type_In_Temp (Atype : Iir);