From 9eb2b04033aa25070708dc14c4b17cd82404f102 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 26 Sep 2019 07:46:39 +0200 Subject: synth: subtype conversion for selected elements. --- src/synth/synth-expr.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 9cb1e0bcc..9c794dbf1 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -1521,7 +1521,8 @@ package body Synth.Expr is N := Build_Extract (Build_Context, Get_Net (Res), Res.Typ.Rec.E (Idx + 1).Off, Get_Type_Width (Res_Typ)); - return Create_Value_Net (N, Res_Typ); + Res := Create_Value_Net (N, Res_Typ); + return Synth_Subtype_Conversion (Res, Expr_Type, False, Expr); end; when Iir_Kind_Character_Literal => return Synth_Expression_With_Type -- cgit v1.2.3