This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/48961] New: EXECUTE_COMMAND_LINE(WAIT=.false.) fails on MinGW


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]