aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-stmts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-11-13 18:36:09 +0100
committerTristan Gingold <tgingold@free.fr>2019-11-13 18:36:09 +0100
commit29693dc550ad3f33e8fba23256640e849818b749 (patch)
tree00b7019a1a1784e75a8fb06b4722ce3949cb23f1 /src/synth/synth-stmts.adb
parentbd26e10bc1d31cf0a781371710ef3be46bb23a4c (diff)
downloadghdl-29693dc550ad3f33e8fba23256640e849818b749.tar.gz
ghdl-29693dc550ad3f33e8fba23256640e849818b749.tar.bz2
ghdl-29693dc550ad3f33e8fba23256640e849818b749.zip
synth: introduce synth-static_oper.
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r--src/synth/synth-stmts.adb10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index cd9bee0d7..70c29013c 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -451,8 +451,14 @@ package body Synth.Stmts is
Synth_Assign (Target.Obj.W, Target.Targ_Type,
Val, Target.Off, Loc);
else
- pragma Assert (Target.Off = 0);
- Assign_Value (Target.Obj, Val, Loc);
+ if not Is_Const (Val) then
+ -- Maybe the error message is too cryptic ?
+ Error_Msg_Synth
+ (+Loc, "cannot assign a net to a static value");
+ else
+ pragma Assert (Target.Off = 0);
+ Assign_Value (Target.Obj, Val, Loc);
+ end if;
end if;
when Target_Memory =>
declare