From 6324fe8dc6aba1e0a57575a2986407df150f59f3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 1 Oct 2019 20:03:47 +0200 Subject: synth: fix in extract_merge_partial_assigns. --- src/synth/synth-environment.adb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/synth/synth-environment.adb') diff --git a/src/synth/synth-environment.adb b/src/synth/synth-environment.adb index 8403e1066..2f6043cf9 100644 --- a/src/synth/synth-environment.adb +++ b/src/synth/synth-environment.adb @@ -797,8 +797,13 @@ package body Synth.Environment is begin if Pa.Offset <= Off then Off := Uns32'Max (Pa.Offset, Min_Off); + -- FIXME: May increase the width. Wd := Width'Min (Wd, Get_Width (Pa.Value) - (Off - Pa.Offset)); + elsif Pa.Offset < Off + Wd then + -- Reduce the width when there is an assignment after + -- the current offset. + Wd := Pa.Offset - Off; end if; end; end if; -- cgit v1.2.3