diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-06-25 18:40:22 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-06-25 18:40:22 +0200 |
commit | e49f709cab51d8f1d0b4a11f93ed383dce8392ec (patch) | |
tree | a0f429e8c6709b959b7d2aec2329f9c509aebf93 /src | |
parent | 850a99e8d49d910d1afb86d954f7145a31c657ca (diff) | |
download | ghdl-e49f709cab51d8f1d0b4a11f93ed383dce8392ec.tar.gz ghdl-e49f709cab51d8f1d0b4a11f93ed383dce8392ec.tar.bz2 ghdl-e49f709cab51d8f1d0b4a11f93ed383dce8392ec.zip |
vhdl: add missing check_read. Fix #1381
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-sem_expr.adb | 3 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_names.adb | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb index b7560904f..e9b2663a9 100644 --- a/src/vhdl/vhdl-sem_expr.adb +++ b/src/vhdl/vhdl-sem_expr.adb @@ -638,6 +638,9 @@ package body Vhdl.Sem_Expr is end if; end if; + Check_Read (Left); + Check_Read (Right); + Left := Eval_Expr_If_Static (Left); Right := Eval_Expr_If_Static (Right); diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb index 6e7d1e11d..107bb46cb 100644 --- a/src/vhdl/vhdl-sem_names.adb +++ b/src/vhdl/vhdl-sem_names.adb @@ -652,6 +652,7 @@ package body Vhdl.Sem_Names is Index := Sem_Expression (Index, Get_Base_Type (Index_Subtype)); end if; if Index /= Null_Iir then + Check_Read (Index); if Get_Expr_Staticness (Index) = Locally and then Get_Type_Staticness (Index_Subtype) = Locally then |