data/full_repos/permissive/143278/ivltests/pr1978358.v
data/verilator_xmls/9efc0f1d-4878-432f-a79e-97b8fda373d7.xml
module top;
  reg pass = 1'b1;
  reg [3:0] var = 4'b1001;


  reg [3:0] part;
  reg [5:0] big;

  initial begin
`ifdef SUPPORT_CONST_OUT_OF_RANGE_IN_IVTEST
    part = var[1:-2];
    if (part !== 4'b01xx) begin
      $display("part select [1:-2] failed, expected 4'b01xx, got %b", part);
      pass = 1'b0;
    end

    part = var[5:2];
    if (part !== 4'bxx10) begin
      $display("part select [5:2] failed, expected 4'bxx10, got %b", part);
      pass = 1'b0;
    end

    big = var[4:-1];
    if (big !== 6'bx1001x) begin
      $display("part select [4:-1] failed, expected 6'bx1001x, got %b", big);
      pass = 1'b0;
    end
`endif

    if (pass) $display("PASSED");
  end
endmodule
module top;

  reg pass = 1'b1;
  reg [3:0] var = 4'b1001;


  reg [3:0] part;
  reg [5:0] big;

  initial begin
`ifdef SUPPORT_CONST_OUT_OF_RANGE_IN_IVTEST
    part = var[1:-2];
    if (part !== 4'b01xx) begin
      $display("part select [1:-2] failed, expected 4'b01xx, got %b", part);
      pass = 1'b0;
    end

    part = var[5:2];
    if (part !== 4'bxx10) begin
      $display("part select [5:2] failed, expected 4'bxx10, got %b", part);
      pass = 1'b0;
    end

    big = var[4:-1];
    if (big !== 6'bx1001x) begin
      $display("part select [4:-1] failed, expected 6'bx1001x, got %b", big);
      pass = 1'b0;
    end
`endif

    if (pass) $display("PASSED");
  end
endmodule