From 5e534966512e77a05b0ebc944568c64c0c433a6b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 2 Nov 2017 05:50:34 +0100 Subject: trans-chap8: remove duplicate and incorrect base allocation. --- src/vhdl/translate/trans-chap8.adb | 9 ++++++--- 1 file 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; -- cgit v1.2.3