diff options
| author | Tristan Gingold <tgingold@free.fr> | 2022-09-25 06:34:41 +0200 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2022-09-25 11:43:29 +0200 | 
| commit | aa57bf3d03e8e3856f0f4b29f042132bb8f58ab9 (patch) | |
| tree | a1db304253b3b6148053b596491486ca54edb2df /src | |
| parent | 27512f0110d640cd8631b8adfa4a83da72399c5c (diff) | |
| download | ghdl-aa57bf3d03e8e3856f0f4b29f042132bb8f58ab9.tar.gz ghdl-aa57bf3d03e8e3856f0f4b29f042132bb8f58ab9.tar.bz2 ghdl-aa57bf3d03e8e3856f0f4b29f042132bb8f58ab9.zip | |
synth-vhdl_eval: handle null-null in array concatenations
Diffstat (limited to 'src')
| -rw-r--r-- | src/synth/synth-vhdl_eval.adb | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/src/synth/synth-vhdl_eval.adb b/src/synth/synth-vhdl_eval.adb index 1ca559dec..0ce6fcc91 100644 --- a/src/synth/synth-vhdl_eval.adb +++ b/src/synth/synth-vhdl_eval.adb @@ -605,6 +605,12 @@ package body Synth.Vhdl_Eval is                 Res : Memtyp;              begin                 Check_Matching_Bounds (Le_Typ, Re_Typ, Expr); +               if L_Len = 0 and R_Len = 0 then +                  --  LRM08 9.2.5 Adding operators +                  --  If both operands are null arrays, then the result of the +                  --  concatenation is the right operand. +                  return Right; +               end if;                 Bnd := Elab.Vhdl_Types.Create_Bounds_From_Length                   (Get_Uarray_Index (Res_Typ).Drange, L_Len + R_Len);                 El_Typ := Unshare_Type_Expr (Le_Typ, | 
