aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-values.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-12 10:11:56 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-12 10:11:56 +0100
commit684e6311e46067d104650713c611a934f287ee5d (patch)
tree5269bdc0639dad5f84eab6b4971215955337f427 /src/synth/synth-values.adb
parent7da5c8b0aeca0f824ac7af99dbcdb205d6e1f155 (diff)
downloadghdl-684e6311e46067d104650713c611a934f287ee5d.tar.gz
ghdl-684e6311e46067d104650713c611a934f287ee5d.tar.bz2
ghdl-684e6311e46067d104650713c611a934f287ee5d.zip
synth: handle constants in assignments. Fix for #1080
Diffstat (limited to 'src/synth/synth-values.adb')
-rw-r--r--src/synth/synth-values.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/synth/synth-values.adb b/src/synth/synth-values.adb
index 7bbc562ac..9eb6c324c 100644
--- a/src/synth/synth-values.adb
+++ b/src/synth/synth-values.adb
@@ -707,6 +707,15 @@ package body Synth.Values is
end if;
end Strip_Const;
+ function Strip_Const (Val : Value_Acc) return Value_Acc is
+ begin
+ if Val.Kind = Value_Const then
+ return Val.C_Val;
+ else
+ return Val;
+ end if;
+ end Strip_Const;
+
function Copy (Src : Value_Acc) return Value_Acc;
function Copy_Array (Arr : Value_Array_Acc) return Value_Array_Acc