diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-10-15 18:29:49 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-10-15 18:29:49 +0200 |
commit | 035c971dbfeb6ed63226fc66095a0c8555fb52ef (patch) | |
tree | 9005380164a3fa9e2c7d30740173b6052c0b48ed | |
parent | ebc4f3e50cfd38ffe00efb6c518700ca39972596 (diff) | |
download | ghdl-035c971dbfeb6ed63226fc66095a0c8555fb52ef.tar.gz ghdl-035c971dbfeb6ed63226fc66095a0c8555fb52ef.tar.bz2 ghdl-035c971dbfeb6ed63226fc66095a0c8555fb52ef.zip |
synth: handle overflow literal.
-rw-r--r-- | src/ghdldrv/ghdlsynth.adb | 1 | ||||
-rw-r--r-- | src/synth/synth-expr.adb | 9 |
2 files changed, 9 insertions, 1 deletions
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; |