mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
Don't evaluate built-in system functions if they are overridden.
We don't support evaluating user-defined system functions at compile time. If possible, defer evaluation until run time. If used in a constant expression, output a "sorry" message.
This commit is contained in:
+5
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2018 Stephen Williams ([email protected])
|
||||
* Copyright (c) 1999-2019 Stephen Williams ([email protected])
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
@@ -2400,6 +2400,10 @@ NetESFunc::ID NetESFunc::built_in_id_() const
|
||||
|
||||
NetExpr* NetESFunc::eval_tree()
|
||||
{
|
||||
/* We don't support evaluating overridden functions. */
|
||||
if (is_overridden_)
|
||||
return 0;
|
||||
|
||||
/* Get the ID for this system function if it can be used as a
|
||||
* constant function. */
|
||||
ID id = built_in_id_();
|
||||
|
||||
Reference in New Issue
Block a user