data/full_repos/permissive/143278/ivltests/pr2971207.v
[Errno 2] No such file or directory: 'preprocess.output'
1: b'%Error: data/full_repos/permissive/143278/ivltests/pr2971207.v:41: Unsupported: fork statements\n      fork : my_begin_fork\n      ^~~~\n%Error: data/full_repos/permissive/143278/ivltests/pr2971207.v:80: Unsupported: fork statements\n    fork : my_fork\n    ^~~~\n%Error: data/full_repos/permissive/143278/ivltests/pr2971207.v:103: Unsupported: fork statements\n      fork : my_fork_fork\n      ^~~~\n%Error: Exiting due to 3 error(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module top;
  reg pass, pass_f1, pass_f2, pass_f3, pass_f4, pass_f5;
  reg [8*30:1] res;

  initial begin
    pass = 1'b1;


    $swrite(res, "%m");
    if (res != "top") begin
      $display("Failed initial, got \"%0s\"", res);
      pass = 1'b0;
    end


    begin : my_begin
      $swrite(res, "%m");
      if (res != "top.my_begin") begin
        $display("Failed named begin (1st), got \"%0s\"", res);
        pass = 1'b0;
      end

      begin : my_begin_begin

        $swrite(res, "%m");
        if (res != "top.my_begin.my_begin_begin") begin
          $display("Failed nested named begin, got \"%0s\"", res);
          pass = 1'b0;
        end
      end

      $swrite(res, "%m");
      if (res != "top.my_begin") begin
        $display("Failed named begin (2nd), got \"%0s\"", res);
        pass = 1'b0;
      end


      pass_f1 = 1'b1;
      pass_f2 = 1'b1;
      fork : my_begin_fork
        begin
          $swrite(res, "%m");
          if (res != "top.my_begin.my_begin_fork") begin
            $display("Failed after named begin/fork (1), got \"%0s\"", res);
            pass_f1 = 1'b0;
          end
        end
        begin
          $swrite(res, "%m");
          if (res != "top.my_begin.my_begin_fork") begin
            $display("Failed after named begin/fork (2), got \"%0s\"", res);
            pass_f2 = 1'b0;
          end
        end
      join

      pass = pass & pass_f1 & pass_f2;

      $swrite(res, "%m");
      if (res != "top.my_begin") begin
        $display("Failed named begin (3rd), got \"%0s\"", res);
        pass = 1'b0;
      end
    end


    $swrite(res, "%m");
    if (res != "top") begin
      $display("Failed after named begin, got \"%0s\"", res);
      pass = 1'b0;
    end


    pass_f1 = 1'b1;
    pass_f2 = 1'b1;
    pass_f3 = 1'b1;
    pass_f4 = 1'b1;
    pass_f5 = 1'b1;
    fork : my_fork
      begin
        $swrite(res, "%m");
        if (res != "top.my_fork") begin
          $display("Failed after named fork (1), got \"%0s\"", res);
          pass_f1 = 1'b0;
        end
      end

      begin : my_fork_begin
        $swrite(res, "%m");
        if (res != "top.my_fork.my_fork_begin") begin
          $display("Failed after named fork/begin, got \"%0s\"", res);
          pass_f4 = 1'b0;
        end
      end
      begin
        $swrite(res, "%m");
        if (res != "top.my_fork") begin
          $display("Failed after named fork (2), got \"%0s\"", res);
          pass_f2 = 1'b0;
        end
      end
      fork : my_fork_fork
        begin
          $swrite(res, "%m");
          if (res != "top.my_fork.my_fork_fork") begin
            $display("Failed after named fork/fork, got \"%0s\"", res);
            pass_f2 = 1'b0;
          end
        end
      join
      begin
        $swrite(res, "%m");
        if (res != "top.my_fork") begin
          $display("Failed after named fork (3), got \"%0s\"", res);
          pass_f3 = 1'b0;
        end
      end
    join

    pass = pass & pass_f1 & pass_f2 & pass_f3;


    $swrite(res, "%m");
    if (res != "top") begin
      $display("Failed final, got \"%0s\"", res);
      pass = 1'b0;
    end

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

  reg pass, pass_f1, pass_f2, pass_f3, pass_f4, pass_f5;
  reg [8*30:1] res;

  initial begin
    pass = 1'b1;


    $swrite(res, "%m");
    if (res != "top") begin
      $display("Failed initial, got \"%0s\"", res);
      pass = 1'b0;
    end


    begin : my_begin
      $swrite(res, "%m");
      if (res != "top.my_begin") begin
        $display("Failed named begin (1st), got \"%0s\"", res);
        pass = 1'b0;
      end

      begin : my_begin_begin

        $swrite(res, "%m");
        if (res != "top.my_begin.my_begin_begin") begin
          $display("Failed nested named begin, got \"%0s\"", res);
          pass = 1'b0;
        end
      end

      $swrite(res, "%m");
      if (res != "top.my_begin") begin
        $display("Failed named begin (2nd), got \"%0s\"", res);
        pass = 1'b0;
      end


      pass_f1 = 1'b1;
      pass_f2 = 1'b1;
      fork : my_begin_fork
        begin
          $swrite(res, "%m");
          if (res != "top.my_begin.my_begin_fork") begin
            $display("Failed after named begin/fork (1), got \"%0s\"", res);
            pass_f1 = 1'b0;
          end
        end
        begin
          $swrite(res, "%m");
          if (res != "top.my_begin.my_begin_fork") begin
            $display("Failed after named begin/fork (2), got \"%0s\"", res);
            pass_f2 = 1'b0;
          end
        end
      join

      pass = pass & pass_f1 & pass_f2;

      $swrite(res, "%m");
      if (res != "top.my_begin") begin
        $display("Failed named begin (3rd), got \"%0s\"", res);
        pass = 1'b0;
      end
    end


    $swrite(res, "%m");
    if (res != "top") begin
      $display("Failed after named begin, got \"%0s\"", res);
      pass = 1'b0;
    end


    pass_f1 = 1'b1;
    pass_f2 = 1'b1;
    pass_f3 = 1'b1;
    pass_f4 = 1'b1;
    pass_f5 = 1'b1;
    fork : my_fork
      begin
        $swrite(res, "%m");
        if (res != "top.my_fork") begin
          $display("Failed after named fork (1), got \"%0s\"", res);
          pass_f1 = 1'b0;
        end
      end

      begin : my_fork_begin
        $swrite(res, "%m");
        if (res != "top.my_fork.my_fork_begin") begin
          $display("Failed after named fork/begin, got \"%0s\"", res);
          pass_f4 = 1'b0;
        end
      end
      begin
        $swrite(res, "%m");
        if (res != "top.my_fork") begin
          $display("Failed after named fork (2), got \"%0s\"", res);
          pass_f2 = 1'b0;
        end
      end
      fork : my_fork_fork
        begin
          $swrite(res, "%m");
          if (res != "top.my_fork.my_fork_fork") begin
            $display("Failed after named fork/fork, got \"%0s\"", res);
            pass_f2 = 1'b0;
          end
        end
      join
      begin
        $swrite(res, "%m");
        if (res != "top.my_fork") begin
          $display("Failed after named fork (3), got \"%0s\"", res);
          pass_f3 = 1'b0;
        end
      end
    join

    pass = pass & pass_f1 & pass_f2 & pass_f3;


    $swrite(res, "%m");
    if (res != "top") begin
      $display("Failed final, got \"%0s\"", res);
      pass = 1'b0;
    end

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