[Bug libfortran/48961] New: EXECUTE_COMMAND_LINE(WAIT=.false.) fails on MinGW
thenlich at users dot sourceforge.net
gcc-bugzilla@gcc.gnu.org
Wed May 11 09:40:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48961
Summary: EXECUTE_COMMAND_LINE(WAIT=.false.) fails on MinGW
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: thenlich@users.sourceforge.net
When calling the EXECUTE_COMMAND_LINE intrinsic on Windows and setting the WAIT
argument to .false., the execution causes a runtime error.
For example:
program hello
print *, "Hello world"
end program hello
program test_execute
call execute_command_line("hello.exe", .false.)
end program test_execute
>test_execute
Hello world
Fortran runtime error: Could not execute command line
Expected result:
No runtime error should occur.
Fortran 2008:
13.7.57 EXECUTE_COMMAND_LINE (COMMAND [, WAIT, EXITSTAT, CMDSTAT, CMDMSG ])
...
3 Arguments.
...
WAIT (optional) shall be a default logical scalar. It is an INTENT (IN)
argument. If WAIT is present with the value false, and the processor supports
asynchronous execution of the command, the command is executed asynchronously;
otherwise it is executed synchronously.
5 When the command is executed synchronously, EXECUTE_COMMAND_LINE returns
after the command line has completed execution. Otherwise, EXECUTE_COMMAND_LINE
returns without waiting.
More information about the Gcc-bugs
mailing list