diff options
| author | Tristan Gingold <tgingold@free.fr> | 2019-10-12 19:16:33 +0200 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2019-10-13 18:54:23 +0200 | 
| commit | e31f8827aa700dd69333dd5fc6804a90b5d94742 (patch) | |
| tree | 37510b7b5aeb0a87839f32be1e0399b5e65b259d /src | |
| parent | 22e85aee201d10940e5fedcd7c657a5291fba75f (diff) | |
| download | ghdl-e31f8827aa700dd69333dd5fc6804a90b5d94742.tar.gz ghdl-e31f8827aa700dd69333dd5fc6804a90b5d94742.tar.bz2 ghdl-e31f8827aa700dd69333dd5fc6804a90b5d94742.zip | |
synth-expr: handle integer type conversion.
Diffstat (limited to 'src')
| -rw-r--r-- | src/synth/synth-expr.adb | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index f8f9e0911..500d587d7 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -1367,7 +1367,10 @@ package body Synth.Expr is        Val := Synth_Expression_With_Basetype (Syn_Inst, Expr);        case Get_Kind (Conv_Type) is           when Iir_Kind_Integer_Subtype_Definition => -            if Val.Typ.Kind = Type_Float then +            if Val.Typ.Kind = Type_Discrete then +               --  Int to int. +               return Val; +            elsif Val.Typ.Kind = Type_Float then                 return Create_Value_Discrete (Int64 (Val.Fp), Conv_Typ);              else                 Error_Msg_Synth (+Conv, "unhandled type conversion (to int)"); | 
