aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-static_oper.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-25 18:44:07 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-25 18:44:45 +0100
commitd899563125eabe38653f8be4b314efa644e08b56 (patch)
tree9414cfec3737cffb5fa61cf010e0412512176a77 /src/synth/synth-static_oper.adb
parentddc54474ebef0959a66be0c9323ba34f8fff8e62 (diff)
downloadghdl-d899563125eabe38653f8be4b314efa644e08b56.tar.gz
ghdl-d899563125eabe38653f8be4b314efa644e08b56.tar.bz2
ghdl-d899563125eabe38653f8be4b314efa644e08b56.zip
synth-static_oper: handle alias in concatenation.
Diffstat (limited to 'src/synth/synth-static_oper.adb')
-rw-r--r--src/synth/synth-static_oper.adb6
1 files changed, 4 insertions, 2 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;