data/full_repos/permissive/143278/ivltests/br917c.v
[Errno 2] No such file or directory: 'preprocess.output'
data/verilator_xmls/1ea23fd2-9f2c-4969-aa06-1bdd25106d6d.xml
module main;

   localparam AMAX = 7;
   localparam SHIFT = 4;
   int foo [AMAX:0];
   int unsigned foo_u [AMAX:0];
   int idx;

   initial begin
      for (idx = 0 ; idx <= AMAX ; idx = idx+1) begin
	 foo[idx] = idx - SHIFT;
	 foo_u[idx] = idx;
      end

      for (idx = 0 ; idx <= AMAX ; idx = idx+1) begin
	 if (idx < SHIFT && foo[idx] > 0) begin
	    $display("FAIL -- foo[%0d] = %0d (not signed?)", idx, foo[idx]);
	    $finish;
	 end
	 if (foo[idx] != (idx-SHIFT)) begin
	    $display("FAIL -- foo[%0d] = %0d", idx, foo[idx]);
	    $finish;
	 end
	 if (foo_u[idx] != idx) begin
	    $display("FAIL -- foo_u[%0d] = %0d", idx, foo[idx]);
	    $finish;
	 end
      end

      $display("PASSED");
      $finish;
   end

endmodule
module main;


   localparam AMAX = 7;
   localparam SHIFT = 4;
   int foo [AMAX:0];
   int unsigned foo_u [AMAX:0];
   int idx;

   initial begin
      for (idx = 0 ; idx <= AMAX ; idx = idx+1) begin
	 foo[idx] = idx - SHIFT;
	 foo_u[idx] = idx;
      end

      for (idx = 0 ; idx <= AMAX ; idx = idx+1) begin
	 if (idx < SHIFT && foo[idx] > 0) begin
	    $display("FAIL -- foo[%0d] = %0d (not signed?)", idx, foo[idx]);
	    $finish;
	 end
	 if (foo[idx] != (idx-SHIFT)) begin
	    $display("FAIL -- foo[%0d] = %0d", idx, foo[idx]);
	    $finish;
	 end
	 if (foo_u[idx] != idx) begin
	    $display("FAIL -- foo_u[%0d] = %0d", idx, foo[idx]);
	    $finish;
	 end
      end

      $display("PASSED");
      $finish;
   end

endmodule