I am working on Windows machine with org file with C source block. I want to evaluate code block on remote machine accessible to me with PuTTY. Here is relevant part of the org file:

#+PROPERTY: header-args :noweb yes :results verbatim :dir /pscp:tcl:/home/tc

Now, let us move to the green fields of user input.

#+NAME: echo_arguments
#+BEGIN_SRC C :main no
  #include <stdio.h>

  int main(int argc, const char* argv[])
  {
      printf("Has %d arguments\n", argc);
      for(int i = 0; i < argc; ++i)
          printf("Argument %d:\n%s\n", i, argv[i]);
      return 0;
  }

#+END_SRC

Evaluation of source block results in error with the following message:

Spawning child process: invalid argument

Full messages output is

executing C code block (echo_arguments)...
Continue...
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760k9p.c to /pscp:tcl:/tmp/C-src-5760Xzj.c...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760k9p.c to /pscp:tcl:/tmp/C-src-5760Xzj.c...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760-R2.exe to /pscp:tcl:/tmp/C-bin-5760xHw.exe...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760-R2.exe to /pscp:tcl:/tmp/C-bin-5760xHw.exe...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760wbF.c to /pscp:tcl:/tmp/C-src-5760Xzj.c...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760wbF.c to /pscp:tcl:/tmp/C-src-5760Xzj.c...done
Break
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760KwR to /pscp:tcl:/tmp/ob-input-57609lL...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760KwR to /pscp:tcl:/tmp/ob-input-57609lL...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760kEe to /pscp:tcl:/tmp/ob-error-5760X6X...
Tramp: Waiting for prompts from remote shell...
Tramp: Process has finished.
Tramp: Waiting for prompts from remote shell...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760kEe to /pscp:tcl:/tmp/ob-error-5760X6X...done
Copying c:/Users/Ivan/AppData/Local/Temp/tramp.5760xOk to /pscp:tcl:/tmp/ob-input-57609lL...failed
edebug-signal: Spawning child process: invalid argument

Debugging shows that error occurs inside function org-babel-eval when call to
 org-babel--shell-command-on-region is made at the line 105 of org-eval.el. The line is:

(write-region start end input-file)

There are two things that seem strange:

1. Region is actually empty - input region for C file compilation is empty.
2. There is no problem in writing to remote machine. C source file is written to location needed.
3. Command line is
"gcc -o \"/tmp/C-bin-5760L4M.exe\"  \"/tmp/C-src-5760xjA.c\" "
   If that command line is executed on remote machine, compilation succeeds

Was that error introduced in some recen org version?