diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-03-11 19:20:28 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-03-11 19:21:57 +0100 |
commit | d06bdba9bb348b8a2d593a93051c5ff8b6ea3ae9 (patch) | |
tree | f2e0539c98ead5b7c51bd4ba439f24633d0021c5 /src/synth | |
parent | c7869c73f66871e0c433f816ce1378fc08455581 (diff) | |
download | ghdl-d06bdba9bb348b8a2d593a93051c5ff8b6ea3ae9.tar.gz ghdl-d06bdba9bb348b8a2d593a93051c5ff8b6ea3ae9.tar.bz2 ghdl-d06bdba9bb348b8a2d593a93051c5ff8b6ea3ae9.zip |
synth: check matching bounds for concatenation
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/elab-vhdl_expr.adb | 4 | ||||
-rw-r--r-- | src/synth/synth-static_oper.adb | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/synth/elab-vhdl_expr.adb b/src/synth/elab-vhdl_expr.adb index d105fc730..d897fee69 100644 --- a/src/synth/elab-vhdl_expr.adb +++ b/src/synth/elab-vhdl_expr.adb @@ -437,7 +437,9 @@ package body Elab.Vhdl_Expr is procedure Check_Matching_Bounds (L, R : Type_Acc; Loc : Node) is begin - null; + if not Are_Types_Equal (L, R) then + Error_Msg_Elab (+Loc, "non matching bounds"); + end if; end Check_Matching_Bounds; -- Return the bounds of a one dimensional array/vector type and the diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb index 8b431b21c..a5356398e 100644 --- a/src/synth/synth-static_oper.adb +++ b/src/synth/synth-static_oper.adb @@ -328,7 +328,7 @@ package body Synth.Static_Oper is Res_St : Type_Acc; Res : Memtyp; begin - Check_Matching_Bounds (Left.Typ, Right.Typ, Expr); + Check_Matching_Bounds (Left.Typ, Re_Typ, Expr); Bnd := Synth.Vhdl_Oper.Create_Bounds_From_Length (Syn_Inst, Get_Index_Type (Get_Type (Expr), 0), 1 + Rlen); Res_St := Create_Onedimensional_Array_Subtype |