diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-01-12 10:11:56 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-01-12 10:11:56 +0100 |
commit | 684e6311e46067d104650713c611a934f287ee5d (patch) | |
tree | 5269bdc0639dad5f84eab6b4971215955337f427 /src/synth/synth-values.adb | |
parent | 7da5c8b0aeca0f824ac7af99dbcdb205d6e1f155 (diff) | |
download | ghdl-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.adb | 9 |
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 |