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 /src/synth/synth-expr.adb | |
parent | ebc4f3e50cfd38ffe00efb6c518700ca39972596 (diff) | |
download | ghdl-035c971dbfeb6ed63226fc66095a0c8555fb52ef.tar.gz ghdl-035c971dbfeb6ed63226fc66095a0c8555fb52ef.tar.bz2 ghdl-035c971dbfeb6ed63226fc66095a0c8555fb52ef.zip |
synth: handle overflow literal.
Diffstat (limited to 'src/synth/synth-expr.adb')
-rw-r--r-- | src/synth/synth-expr.adb | 9 |
1 files changed, 9 insertions, 0 deletions
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; |