From 640231bbfa819b47b8ebf38040795c14f7c45ade Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 1 Apr 2008 20:44:58 -0700 Subject: [PATCH] Add code to prevent broken synthesis in devel. from core dumping. This patch adds code to prevent the broken synthesis code in the development branch from core dumping. Broken code here refers to the Icarus code not a Verilog file. --- syn-rules.y | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/syn-rules.y b/syn-rules.y index e0a4f9a74..49ea2586b 100644 --- a/syn-rules.y +++ b/syn-rules.y @@ -1,7 +1,7 @@ %{ /* - * Copyright (c) 2000-2005 Stephen Williams (steve@icarus.com) + * Copyright (c) 2000-2007 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -263,6 +263,9 @@ struct tokenize : public proc_match_t { last_->next_ = cur; last_ = cur; + /* Because synthesis is broken this is needed to prevent + * a seg. fault. */ + if (!dev->if_clause()) return 0; dev -> if_clause() -> match_proc(this); if (dev->else_clause()) {