diff options
Diffstat (limited to 'src/synth/synth-vhdl_expr.adb')
-rw-r--r-- | src/synth/synth-vhdl_expr.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb index 49fa4a546..7cf295417 100644 --- a/src/synth/synth-vhdl_expr.adb +++ b/src/synth/synth-vhdl_expr.adb @@ -710,10 +710,16 @@ package body Synth.Vhdl_Expr is | Iir_Kind_Dereference => declare Val : Valtyp; + Acc : Heap_Index; Obj : Memtyp; begin Val := Synth_Expression (Syn_Inst, Get_Prefix (Name)); - Obj := Elab.Vhdl_Heap.Synth_Dereference (Read_Access (Val)); + Acc := Read_Access (Val); + if Acc = Null_Heap_Index then + Error_Msg_Synth (Syn_Inst, Name, "null access dereference"); + return No_Valtyp; + end if; + Obj := Elab.Vhdl_Heap.Synth_Dereference (Acc); return Create_Value_Memtyp (Obj); end; when others => |