From 0b636ffee57d715eda0c6596321c18ddf916e380 Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Sun, 13 Oct 2019 18:53:36 +0200 Subject: Show error on wait without condition (#976) * Show error on wait without condition * Null node --- src/synth/synth-stmts.adb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/synth/synth-stmts.adb') diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index 05003e40e..63354f00a 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -1925,6 +1925,10 @@ package body Synth.Stmts is -- Handle the condition as an if. Cond := Get_Condition_Clause (Stmt); + if Cond = Null_Node then + Error_Msg_Synth (+Stmt, "expect wait condition"); + return; + end if; Cond_Val := Synth_Expression (C.Inst, Cond); Push_Phi; -- cgit v1.2.3