From dceedf5badd55a00522fc8ccaba110a6b8ab571b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 20 Mar 2020 07:43:27 +0100 Subject: synth-stmts: avoid crash for index in record. Fix #1163 --- src/synth/synth-stmts.adb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index a5304a040..d43fdc10a 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -203,9 +203,9 @@ package body Synth.Stmts is (Get_Build (Syn_Inst), Dest_Voff, Voff); end if; else - if Dest_Voff = No_Net then - Dest_Off := Dest_Off + Off; + Dest_Off := Dest_Off + Off; + if Dest_Voff = No_Net then Strip_Const (Dest_Obj); if Dest_Obj.Kind in Value_Array .. Value_Const_Array then Dest_Obj := Dest_Obj.Arr.V @@ -213,12 +213,6 @@ package body Synth.Stmts is Dest_Off := 0; Dest_W := W; end if; - else - if Dest_Off /= 0 then - -- TODO. - raise Internal_Error; - end if; - Dest_Off := Dest_Off + Off; end if; end if; end; -- cgit v1.2.3