verilator/test_regress/t/t_dfg_3726.v
Geza Lore 6ae6b16223 V3Const: Fix folding of LogAnd with non-bool operands
Folding an AstLogAnd with a non-zero constant operand used to coerce the
type of the other operand, yielding an ill-typed node that DFG was then
unhappy about. Add a RedOr instead if the width of the replacement
operand is greater than zero.

Fixes #3726
2022-11-05 13:36:21 +00:00

20 lines
345 B
Systemverilog

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2022 by Geza Lore.
// SPDX-License-Identifier: CC0-1.0
module t(/*AUTOARG*/
// Outputs
x,
// Inputs
i
);
input i;
output x;
assign x = (i ? 0 : 1) && 1;
endmodule