From 58a211e174a4634a8742ddaddc2cf56613d93bce Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Sun, 13 Oct 2019 10:43:31 +0200 Subject: add record (in)equality (#975) --- src/synth/synth-oper.adb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/synth/synth-oper.adb b/src/synth/synth-oper.adb index c08a85bb3..d6574667b 100644 --- a/src/synth/synth-oper.adb +++ b/src/synth/synth-oper.adb @@ -457,7 +457,8 @@ package body Synth.Oper is when Iir_Predefined_Enum_Less_Equal => return Synth_Compare (Id_Ult); - when Iir_Predefined_Array_Equality => + when Iir_Predefined_Array_Equality + | Iir_Predefined_Record_Equality => if Is_Const (Left) and then Is_Const (Right) then return Create_Value_Discrete (Boolean'Pos (Is_Equal (Left, Right)), Boolean_Type); @@ -469,7 +470,8 @@ package body Synth.Oper is return Create_Value_Discrete (0, Boolean_Type); end if; return Synth_Compare (Id_Eq); - when Iir_Predefined_Array_Inequality => + when Iir_Predefined_Array_Inequality + | Iir_Predefined_Record_Inequality => if Is_Const (Left) and then Is_Const (Right) then return Create_Value_Discrete (Boolean'Pos (not Is_Equal (Left, Right)), Boolean_Type); -- cgit v1.2.3