aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-stmts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-20 07:43:27 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-20 07:43:27 +0100
commitdceedf5badd55a00522fc8ccaba110a6b8ab571b (patch)
tree05f725688b2dd10abb24fb670db1d0c78fdfe694 /src/synth/synth-stmts.adb
parent522c10d28a483d533f3ccb2bcda2cc905c2bf677 (diff)
downloadghdl-dceedf5badd55a00522fc8ccaba110a6b8ab571b.tar.gz
ghdl-dceedf5badd55a00522fc8ccaba110a6b8ab571b.tar.bz2
ghdl-dceedf5badd55a00522fc8ccaba110a6b8ab571b.zip
synth-stmts: avoid crash for index in record. Fix #1163
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r--src/synth/synth-stmts.adb10
1 files 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;