diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-14 09:42:00 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-14 09:42:00 +0100 |
commit | 7052ac9006b145c0cd51f2bad8e088c1338f3846 (patch) | |
tree | f64dc8ee4a4e2d308937182ca6e354156f5c211a /src/synth/elab-vhdl_expr.adb | |
parent | 4d1eef97f13ee160e78eda631c5be1480c5f538c (diff) | |
download | ghdl-7052ac9006b145c0cd51f2bad8e088c1338f3846.tar.gz ghdl-7052ac9006b145c0cd51f2bad8e088c1338f3846.tar.bz2 ghdl-7052ac9006b145c0cd51f2bad8e088c1338f3846.zip |
synth: improve error propagation on slices
Diffstat (limited to 'src/synth/elab-vhdl_expr.adb')
-rw-r--r-- | src/synth/elab-vhdl_expr.adb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/synth/elab-vhdl_expr.adb b/src/synth/elab-vhdl_expr.adb index bef85b306..c43e3808e 100644 --- a/src/synth/elab-vhdl_expr.adb +++ b/src/synth/elab-vhdl_expr.adb @@ -480,11 +480,15 @@ package body Elab.Vhdl_Expr is Res_Bnd : Bound_Type; Sl_Off : Value_Offsets; Inp : Net; + Err : Boolean; begin Pfx_Typ := Exec_Name_Subtype (Syn_Inst, Get_Prefix (Name)); Get_Onedimensional_Array_Bounds (Pfx_Typ, Pfx_Bnd, El_Typ); Synth_Slice_Suffix (Syn_Inst, Name, Pfx_Bnd, El_Typ, - Res_Bnd, Inp, Sl_Off); + Res_Bnd, Inp, Sl_Off, Err); + if Err then + return null; + end if; pragma Assert (Inp = No_Net); return Create_Onedimensional_Array_Subtype (Pfx_Typ, Res_Bnd, El_Typ); |