diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-11-02 05:50:34 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-11-02 05:50:34 +0100 |
commit | 5e534966512e77a05b0ebc944568c64c0c433a6b (patch) | |
tree | dbfee747b6c583056231c15d1dda20439f6f58f6 | |
parent | 1b490f5c9f4a1ed12793ccd591f8e55f18bcd9b2 (diff) | |
download | ghdl-5e534966512e77a05b0ebc944568c64c0c433a6b.tar.gz ghdl-5e534966512e77a05b0ebc944568c64c0c433a6b.tar.bz2 ghdl-5e534966512e77a05b0ebc944568c64c0c433a6b.zip |
trans-chap8: remove duplicate and incorrect base allocation.
-rw-r--r-- | src/vhdl/translate/trans-chap8.adb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vhdl/translate/trans-chap8.adb b/src/vhdl/translate/trans-chap8.adb index 8ba3256a6..c97807064 100644 --- a/src/vhdl/translate/trans-chap8.adb +++ b/src/vhdl/translate/trans-chap8.adb @@ -2734,9 +2734,12 @@ package body Trans.Chap8 is (M2Lp (Chap3.Get_Composite_Bounds (Param)), M2Addr (Chap3.Get_Composite_Bounds (Params (Pos)))); - -- Allocate the base. - Chap3.Allocate_Unbounded_Composite_Base - (Alloc, Param, Formal_Type); + if Get_Type_Staticness (Actual_Type) >= Globally then + -- Allocate the base (only if the bounds are + -- known). + Chap3.Allocate_Unbounded_Composite_Base + (Alloc, Param, Formal_Type); + end if; Saved_Sig (Pos) := Param; end if; |