From 1bb3b9066a16a0ace6ac2195f7a500896259fb03 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 1 Jan 2021 11:28:48 +0100 Subject: synth-expr: propagate error in synth_indexed_name --- src/synth/netlists-inference.adb | 1 + src/synth/synth-expr.adb | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/synth/netlists-inference.adb b/src/synth/netlists-inference.adb index ecd90bb22..58df1b556 100644 --- a/src/synth/netlists-inference.adb +++ b/src/synth/netlists-inference.adb @@ -361,6 +361,7 @@ package body Netlists.Inference is -- Create the FF. if Rst = No_Net then + -- No async reset pragma Assert (Rst_Val = No_Net); if Els = No_Net then if Init /= No_Net then diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 90c4c59b6..4b04060f4 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -1210,6 +1210,13 @@ package body Synth.Expr is -- Use the base type as the subtype of the index is not synth-ed. Idx_Val := Synth_Expression_With_Basetype (Syn_Inst, Idx_Expr); + if Idx_Val = No_Valtyp then + -- Propagate errorc + Voff := No_Net; + Off := (0, 0); + return; + end if; + Strip_Const (Idx_Val); Bnd := Get_Array_Bound (Pfx_Type, Dim_Type (I + 1)); -- cgit v1.2.3