aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_stmts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-03-08 22:27:05 +0100
committerTristan Gingold <tgingold@free.fr>2021-03-08 22:27:05 +0100
commit86e924834a11200167f0a38a3193cbdaa4f2dbe1 (patch)
tree96038105278ac6c4954867d63e5481111d0eba0c /src/vhdl/vhdl-sem_stmts.adb
parent2036d713a73a91a8014d0d63201d795807e0c924 (diff)
downloadghdl-86e924834a11200167f0a38a3193cbdaa4f2dbe1.tar.gz
ghdl-86e924834a11200167f0a38a3193cbdaa4f2dbe1.tar.bz2
ghdl-86e924834a11200167f0a38a3193cbdaa4f2dbe1.zip
Add a warning for processes without a wait statement. Fix #1677
Diffstat (limited to 'src/vhdl/vhdl-sem_stmts.adb')
-rw-r--r--src/vhdl/vhdl-sem_stmts.adb20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb
index c7f734404..b0b0447da 100644
--- a/src/vhdl/vhdl-sem_stmts.adb
+++ b/src/vhdl/vhdl-sem_stmts.adb
@@ -2240,13 +2240,19 @@ package body Vhdl.Sem_Stmts is
Set_Is_Within_Flag (Proc, False);
- if Get_Kind (Proc) = Iir_Kind_Sensitized_Process_Statement
- and then Get_Callees_List (Proc) /= Null_Iir_List
- then
- -- Check there is no wait statement in subprograms called.
- -- Also in the case of all-sensitized process, check that package
- -- subprograms don't read signals.
- Sem.Add_Analysis_Checks_List (Proc);
+ if Get_Kind (Proc) = Iir_Kind_Sensitized_Process_Statement then
+ if Get_Callees_List (Proc) /= Null_Iir_List then
+ -- Check there is no wait statement in subprograms called.
+ -- Also in the case of all-sensitized process, check that package
+ -- subprograms don't read signals.
+ Sem.Add_Analysis_Checks_List (Proc);
+ end if;
+ else
+ if not Get_Suspend_Flag (Proc) then
+ Warning_Msg_Sem
+ (Warnid_No_Wait, +Proc,
+ "infinite loop for this process without a wait statement");
+ end if;
end if;
end Sem_Process_Statement;