From 035c971dbfeb6ed63226fc66095a0c8555fb52ef Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 15 Oct 2019 18:29:49 +0200 Subject: synth: handle overflow literal. --- src/ghdldrv/ghdlsynth.adb | 1 - src/synth/synth-expr.adb | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb index f22174e0e..6fa315ed6 100644 --- a/src/ghdldrv/ghdlsynth.adb +++ b/src/ghdldrv/ghdlsynth.adb @@ -145,7 +145,6 @@ package body Ghdlsynth is -- Will elaborate. Flags.Flag_Elaborate := True; Flags.Flag_Elaborate_With_Outdated := E_Opt >= Args'First; - Flags.Flag_Only_Elab_Warnings := True; -- Load content only if there are no files. Libraries.Load_Work_Library (E_Opt >= Args'First); diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index aef7420ed..8c051fd00 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -1667,6 +1667,15 @@ package body Synth.Expr is B := Synth_Array_Attribute (Syn_Inst, Expr); return Create_Value_Discrete (Int64 (B.Len), Expr_Type); end; + when Iir_Kind_Overflow_Literal => + declare + N : Net; + begin + Error_Msg_Synth + (+Expr, "error detected during analysis injected"); + N := Build_Const_X (Get_Build (Syn_Inst), Expr_Type.W); + return Create_Value_Net (N, Expr_Type); + end; when others => Error_Kind ("synth_expression_with_type", Expr); end case; -- cgit v1.2.3