diff options
| author | Tristan Gingold <tgingold@free.fr> | 2022-07-07 08:21:18 +0200 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2022-07-07 08:21:18 +0200 | 
| commit | fe420f2cd66a7769abdbdc804bb228b0105edb37 (patch) | |
| tree | 7e5f7f27cac2b78e5d1e829202de8f9d01606364 /src | |
| parent | 774dcd646151328991440b7b7c2cbaf750dcc2b6 (diff) | |
| download | ghdl-fe420f2cd66a7769abdbdc804bb228b0105edb37.tar.gz ghdl-fe420f2cd66a7769abdbdc804bb228b0105edb37.tar.bz2 ghdl-fe420f2cd66a7769abdbdc804bb228b0105edb37.zip  | |
vhdl-evaluation: make overflow_literal non locally static.
Fix crash in translation (tentatively)
Diffstat (limited to 'src')
| -rw-r--r-- | src/vhdl/vhdl-canon.adb | 3 | ||||
| -rw-r--r-- | src/vhdl/vhdl-evaluation.adb | 4 | 
2 files changed, 6 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb index 2a8ef8aa0..67d91478d 100644 --- a/src/vhdl/vhdl-canon.adb +++ b/src/vhdl/vhdl-canon.adb @@ -116,6 +116,9 @@ package body Vhdl.Canon is        end if;        case Get_Kind (Expr) is +         when Iir_Kind_Overflow_Literal => +            null; +           when Iir_Kind_Slice_Name =>              if not Is_Target and then                Get_Name_Staticness (Expr) >= Globally diff --git a/src/vhdl/vhdl-evaluation.adb b/src/vhdl/vhdl-evaluation.adb index 0cf803f97..653cbdb31 100644 --- a/src/vhdl/vhdl-evaluation.adb +++ b/src/vhdl/vhdl-evaluation.adb @@ -228,7 +228,9 @@ package body Vhdl.Evaluation is        Location_Copy (Res, Origin);        Set_Type (Res, Expr_Type);        Set_Literal_Origin (Res, Origin); -      Set_Expr_Staticness (Res, Locally); +      --  Expression is not static so that it will be an error if it needs +      --  to.  Otherwise, the error will occur at runtime. +      Set_Expr_Staticness (Res, None);        return Res;     end Build_Overflow;  | 
