data/full_repos/permissive/143278/ivltests/unary_lnot3.v
1: b'%Warning-WIDTH: data/full_repos/permissive/143278/ivltests/unary_lnot3.v:59: Logical Operator LOGNOT expects 1 bit on the LHS, but LHS\'s VARREF \'xx\' generates 2 bits.\n                                                                           : ... In instance main\n      x = !xx;\n          ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Error: Exiting due to 1 warning(s)\n'
module main;

   reg x;
   reg [1:0] xx;


   initial begin
      if (1'bx !== 1'bx) begin
	 $display("FAILED -- simple constant x does't compare.");
	 $finish;
      end

      if (1'bx !== !1'bx) begin
	 $display("FAILED -- !1'bx comes out wrong.");
	 $finish;
      end

      x = 1'bx;
      if (x !== 1'bx) begin
	 $display("FAILED -- variable x comes out wrong.");
	 $finish;
      end

      x = !x;
      if (x !== 1'bx) begin
	 $display("FAILED -- ! of variable x comes out wrong.");
	 $finish;
      end

      xx = 2'bx0;
      if (xx !== 2'bx0) begin
	 $display("FAILED -- variable x comes out wrong.");
	 $finish;
      end

      x = !xx;
      if (x !== 1'bx) begin
	 $display("FAILED -- ! of variable xx comes out wrong.");
	 $finish;
      end

      $display("PASSED");
   end

endmodule
module main;


   reg x;
   reg [1:0] xx;


   initial begin
      if (1'bx !== 1'bx) begin
	 $display("FAILED -- simple constant x does't compare.");
	 $finish;
      end

      if (1'bx !== !1'bx) begin
	 $display("FAILED -- !1'bx comes out wrong.");
	 $finish;
      end

      x = 1'bx;
      if (x !== 1'bx) begin
	 $display("FAILED -- variable x comes out wrong.");
	 $finish;
      end

      x = !x;
      if (x !== 1'bx) begin
	 $display("FAILED -- ! of variable x comes out wrong.");
	 $finish;
      end

      xx = 2'bx0;
      if (xx !== 2'bx0) begin
	 $display("FAILED -- variable x comes out wrong.");
	 $finish;
      end

      x = !xx;
      if (x !== 1'bx) begin
	 $display("FAILED -- ! of variable xx comes out wrong.");
	 $finish;
      end

      $display("PASSED");
   end

endmodule