aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-02-18 07:38:35 +0100
committerTristan Gingold <tgingold@free.fr>2018-02-18 07:40:05 +0100
commitc95389e1c44b5ad2b54b3b7d4eeb666a0a87a1ac (patch)
tree1efa21e76d42474c4f1b261d85548066a19f60ec
parent20225660889132452360ff6e8403fbc88d60e677 (diff)
downloadghdl-c95389e1c44b5ad2b54b3b7d4eeb666a0a87a1ac.tar.gz
ghdl-c95389e1c44b5ad2b54b3b7d4eeb666a0a87a1ac.tar.bz2
ghdl-c95389e1c44b5ad2b54b3b7d4eeb666a0a87a1ac.zip
sem_subprogram_body: handle all_sensitized_state for all subprograms.
fix #529
-rw-r--r--src/vhdl/canon.adb3
-rw-r--r--src/vhdl/sem.adb14
2 files changed, 8 insertions, 9 deletions
diff --git a/src/vhdl/canon.adb b/src/vhdl/canon.adb
index 5ced8f0e5..13f66b8f6 100644
--- a/src/vhdl/canon.adb
+++ b/src/vhdl/canon.adb
@@ -552,8 +552,7 @@ package body Canon is
end Canon_Extract_Sensitivity_From_Callees;
function Canon_Extract_Process_Sensitivity
- (Proc : Iir_Sensitized_Process_Statement)
- return Iir_List
+ (Proc : Iir_Sensitized_Process_Statement) return Iir_List
is
Res : Iir_List;
begin
diff --git a/src/vhdl/sem.adb b/src/vhdl/sem.adb
index c8f0822e2..a1283ff17 100644
--- a/src/vhdl/sem.adb
+++ b/src/vhdl/sem.adb
@@ -2112,13 +2112,6 @@ package body Sem is
end;
end if;
- -- Set All_Sensitized_State in trivial cases.
- if Get_All_Sensitized_State (Spec) = Unknown
- and then Get_Callees_List (Subprg) = Null_Iir_List
- then
- Set_All_Sensitized_State (Spec, No_Signal);
- end if;
-
-- Do not add to Analysis_Check_List as procedures can't
-- generate purity/wait/all-sensitized errors by themselves.
@@ -2131,6 +2124,13 @@ package body Sem is
when others =>
Error_Kind ("sem_subprogram_body", Spec);
end case;
+
+ -- Set All_Sensitized_State in trivial cases.
+ if Get_All_Sensitized_State (Spec) = Unknown
+ and then Get_Callees_List (Subprg) = Null_Iir_List
+ then
+ Set_All_Sensitized_State (Spec, No_Signal);
+ end if;
end Sem_Subprogram_Body;
-- Status of Update_And_Check_Pure_Wait.