diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-10-13 20:33:23 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-10-13 20:33:23 +0200 |
commit | 67df90261a4b74f42de1995dfc9315cd01290ba4 (patch) | |
tree | 5db8fdf9a72b8f041505048908ad658d5ad92647 /src/synth/synth-expr.adb | |
parent | 090420bd1a57ba496f0d59bf7a119d05a68ea1e3 (diff) | |
download | ghdl-67df90261a4b74f42de1995dfc9315cd01290ba4.tar.gz ghdl-67df90261a4b74f42de1995dfc9315cd01290ba4.tar.bz2 ghdl-67df90261a4b74f42de1995dfc9315cd01290ba4.zip |
synth: handle constants for condition operator.
Diffstat (limited to 'src/synth/synth-expr.adb')
-rw-r--r-- | src/synth/synth-expr.adb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 500d587d7..dbc172de6 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -1541,6 +1541,10 @@ package body Synth.Expr is begin Synth_Assignment_Prefix (Syn_Inst, Expr, Obj, Off, Voff, Rdwd, Typ); + if Voff = No_Net and then Is_Const (Obj) then + pragma Assert (Off = 0); + return Obj; + end if; return Synth_Read_Memory (Syn_Inst, Obj, Off, Voff, Typ, Expr); end; when Iir_Kind_Selected_Element => |