aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-09-28 02:43:32 +0200
committerTristan Gingold <tgingold@free.fr>2016-09-28 02:43:32 +0200
commit778765aaef17461597188b1b98a8d922df05d243 (patch)
tree075036b091154d1f802782c5fdf0f813046df9bf /src
parent8f8e5c379d9686d42046088f59036af5371b49a9 (diff)
downloadghdl-778765aaef17461597188b1b98a8d922df05d243.tar.gz
ghdl-778765aaef17461597188b1b98a8d922df05d243.tar.bz2
ghdl-778765aaef17461597188b1b98a8d922df05d243.zip
Fix crash of issue #155
Using proposed patch by jbnote.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/sem_names.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index 585af6aa7..793df93e1 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -1297,9 +1297,8 @@ package body Sem_Names is
is
procedure Update_Impure_Depth (Subprg_Spec : Iir; Depth : Iir_Int32)
is
- Bod : Iir;
+ Bod : constant Iir := Get_Subprogram_Body (Subprg_Spec);
begin
- Bod := Get_Subprogram_Body (Subprg_Spec);
if Bod = Null_Iir then
return;
end if;
@@ -1396,6 +1395,7 @@ package body Sem_Names is
| Iir_Kind_Block_Statement
| Iir_Kind_If_Generate_Statement
| Iir_Kind_For_Generate_Statement
+ | Iir_Kind_Generate_Statement_Body
| Iir_Kinds_Process_Statement
| Iir_Kind_Protected_Type_Body =>
-- The procedure is impure.