aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-oper.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/synth-oper.adb')
-rw-r--r--src/synth/synth-oper.adb10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb
index f2ab7cb5b..b9926aff0 100644
--- a/src/synth/synth-oper.adb
+++ b/src/synth/synth-oper.adb
@@ -419,11 +419,13 @@ package body Synth.Oper is
return Create_Value_Discrete
(Boolean'Pos (Is_Equal (Left, Right)), Boolean_Type);
end if;
- if Is_Vector_Type (Left_Type) then
- return Synth_Compare (Id_Eq);
- else
- raise Internal_Error;
+ if not Is_Matching_Bounds (Left.Typ, Right.Typ) then
+ Warning_Msg_Synth
+ (+Expr,
+ "length of '=' operands doesn't match, result is false");
+ return Create_Value_Discrete (0, Boolean_Type);
end if;
+ return Synth_Compare (Id_Eq);
when Iir_Predefined_Array_Inequality =>
-- TODO: check size, handle non-vector.
if Is_Vector_Type (Left_Type) then