1// DESCRIPTION: Verilator: Test for warning (not error) on improperly width'ed
2// default function argument
3//
4// This file ONLY is placed into the Public Domain, for any use,
5// without warranty, 2015 by Todd Strader.
6// SPDX-License-Identifier: CC0-1.0
7
8function logic foo
9  (
10   // Intentionally provide a non-width'ed default value
11   // This should warn, not error out
12   input logic x = 0
13   );
14   return x;
15endfunction
16
17module t (/*AUTOARG*/);
18   logic foo_val;
19
20   initial begin
21      foo_val = foo();
22      if (foo_val != 1'b0) $stop;
23
24      $write("*-* All Finished *-*\n");
25      $finish;
26   end
27
28endmodule
29