From cb2ed9210ca358d56b83588164fcc0d59cd89687 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Thu, 16 Oct 2008 19:34:22 +0100 Subject: [PATCH] Fix for pr2169870. This patch fixes a bug which prevented storage being allocated for automatic tasks that had no input or output parameters. --- elaborate.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elaborate.cc b/elaborate.cc index 19e6d5894..e0aac7e79 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -2460,9 +2460,9 @@ NetProc* PCallTask::elaborate_usr(Design*des, NetScope*scope) const NetUTask*cur; - /* Handle tasks with no parameters specially. There is no need - to make a sequential block to hold the generated code. */ - if (nparms() == 0) { + /* Handle non-automatic tasks with no parameters specially. There is + no need to make a sequential block to hold the generated code. */ + if ((nparms() == 0) && !task->is_auto()) { cur = new NetUTask(task); cur->set_line(*this); return cur;