From 778765aaef17461597188b1b98a8d922df05d243 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 28 Sep 2016 02:43:32 +0200 Subject: Fix crash of issue #155 Using proposed patch by jbnote. --- src/vhdl/sem_names.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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. -- cgit v1.2.3