diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-03-25 18:44:07 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-03-25 18:44:45 +0100 |
commit | d899563125eabe38653f8be4b314efa644e08b56 (patch) | |
tree | 9414cfec3737cffb5fa61cf010e0412512176a77 /src/synth | |
parent | ddc54474ebef0959a66be0c9323ba34f8fff8e62 (diff) | |
download | ghdl-d899563125eabe38653f8be4b314efa644e08b56.tar.gz ghdl-d899563125eabe38653f8be4b314efa644e08b56.tar.bz2 ghdl-d899563125eabe38653f8be4b314efa644e08b56.zip |
synth-static_oper: handle alias in concatenation.
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/synth-static_oper.adb | 6 | ||||
-rw-r--r-- | src/synth/synth-values.adb | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb index 349117d87..1b0cf1cdc 100644 --- a/src/synth/synth-static_oper.adb +++ b/src/synth/synth-static_oper.adb @@ -536,6 +536,8 @@ package body Synth.Static_Oper is Iir_Index32 (Get_Bound_Length (Left.Typ, 1)); R_Len : constant Iir_Index32 := Iir_Index32 (Get_Bound_Length (Right.Typ, 1)); + L : constant Value_Acc := Strip_Alias_Const (Left); + R : constant Value_Acc := Strip_Alias_Const (Right); Bnd : Bound_Type; Res_Typ : Type_Acc; Arr : Value_Array_Acc; @@ -547,10 +549,10 @@ package body Synth.Static_Oper is (Ret_Typ, Bnd); Arr := Create_Value_Array (L_Len + R_Len); for I in 1 .. L_Len loop - Arr.V (I) := Left.Arr.V (I); + Arr.V (I) := L.Arr.V (I); end loop; for I in 1 .. R_Len loop - Arr.V (L_Len + I) := Right.Arr.V (I); + Arr.V (L_Len + I) := R.Arr.V (I); end loop; return Create_Value_Const_Array (Res_Typ, Arr); end; diff --git a/src/synth/synth-values.adb b/src/synth/synth-values.adb index f2a9d7033..0d10a94da 100644 --- a/src/synth/synth-values.adb +++ b/src/synth/synth-values.adb @@ -90,7 +90,7 @@ package body Synth.Values is when Value_Const => return True; when Value_Alias => - return False; + return Is_Static_Val (Val.A_Obj); when Value_Instance | Value_Subtype => -- Not really a value. |