From c8f04860aee0639bca5b40295eff37f9ad46b9af Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 16 Aug 2019 12:14:23 +0200 Subject: synth: handle integer values in subtype conversion. For tgingold/ghdlsynth-beta#33 --- src/synth/synth-expr.adb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index fd827ef03..fae3b80fb 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -766,6 +766,8 @@ package body Synth.Expr is N := Build_Trunc (Build_Context, Id_Utrunc, N, Drng.W); Set_Location (N, Loc); return Create_Value_Net (N, Dtype); + when Value_Discrete => + return Create_Value_Discrete (Val.Scal, Dtype); when others => raise Internal_Error; end case; -- cgit v1.2.3