From 87a468380c789d508acf88c252b5db674cae1b07 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 7 Apr 2020 08:03:45 +0200 Subject: synth: fix a regression about target aggregate. --- src/synth/synth-stmts.adb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index 6a7081810..8717842d9 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -369,6 +369,18 @@ package body Synth.Stmts is Set_Location (N, Loc); return Create_Value_Net (N, Typ); end; + when Value_Memory => + declare + Res : Valtyp; + begin + Res := Create_Value_Memory (Typ); + -- Need to reverse offsets. + Copy_Memory + (Res.Val.Mem, + Val.Val.Mem + (Val.Typ.Sz - Size_Type (Off + 1) * El_Typ.Sz), + Typ.Sz); + return Res; + end; when others => raise Internal_Error; end case; -- cgit v1.2.3