diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-09-25 20:47:07 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-09-25 20:47:07 +0200 |
commit | ecd791d210198c82a88ee238d43ca02b2a36a1c1 (patch) | |
tree | b22342e56b7df7eae06edbdf6acb7cd1be846f44 /src/synth/synth-values.adb | |
parent | 6e9336d11dfc4f53dba234e1f02a2b0172461e0c (diff) | |
download | ghdl-ecd791d210198c82a88ee238d43ca02b2a36a1c1.tar.gz ghdl-ecd791d210198c82a88ee238d43ca02b2a36a1c1.tar.bz2 ghdl-ecd791d210198c82a88ee238d43ca02b2a36a1c1.zip |
synth: handle array equality (for constances).
Diffstat (limited to 'src/synth/synth-values.adb')
-rw-r--r-- | src/synth/synth-values.adb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/synth/synth-values.adb b/src/synth/synth-values.adb index 4cffaeedf..ed59d6af5 100644 --- a/src/synth/synth-values.adb +++ b/src/synth/synth-values.adb @@ -112,6 +112,16 @@ package body Synth.Values is case L.Kind is when Value_Discrete => return L.Scal = R.Scal; + when Value_Const_Array => + if L.Arr.Len /= R.Arr.Len then + return False; + end if; + for I in L.Arr.V'Range loop + if not Is_Equal (L.Arr.V (I), R.Arr.V (I)) then + return False; + end if; + end loop; + return True; when others => -- TODO. raise Internal_Error; |