From ecdc917bd5ff5d1e314796a24fd40d9716a37918 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 30 Sep 2019 00:26:16 +0200 Subject: synth: slice: avoid crash in case of incorrect slice. --- src/synth/synth-stmts.adb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index 57a155a9f..726017f27 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -160,12 +160,12 @@ package body Synth.Stmts is if Voff /= No_Net then Error_Msg_Synth (+Pfx, "dynamic index must be the last suffix"); - return; + else + -- FIXME: check index. + pragma Assert (Mul = 0); + null; end if; - -- FIXME: check index. - - pragma Assert (Mul = 0); Dest_Off := Dest_Off + Off; Dest_Type := Get_Array_Element (Dest_Type); end; -- cgit v1.2.3