You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Author Name: Johan Bjork
Original Redmine Issue: 1004 from https://www.veripool.org
Original Date: 2015-11-21
Original Assignee: Johan Bjork
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed into the Public Domain, for any use,
// without warranty, 2015 by Johan Bjork.
package foo;
localparam FOO = 256 >> 2;
endpackage
import foo::*;
module t;
localparam BAZ = f('0);
function integer f();
return FOO;
endfunction
endmodule
Fails with
%Error: t/t_func_const_bad.v:11: Expecting expression to be constant, but can't determine constant for FUNCREF 'f'
%Error: t/t_func_const_bad.v:13: ... Location of non-constant VARREF 'FOO': Language violation: reference to non-function-local variable
-node: FUNCREF 0x7fdea041f100 <e92#> {e11} @dt=0x7fdea041f3e0@(sw32) f -> FUNC 0x7fdea041f4d0 <e91#> {e12} @dt=0x7fdea041f3e0@(sw32) f
The text was updated successfully, but these errors were encountered:
Author Name: Johan Bjork
Original Redmine Issue: 1004 from https://www.veripool.org
Original Date: 2015-11-21
Original Assignee: Johan Bjork
Fails with
The text was updated successfully, but these errors were encountered: