Skip to content

When dummy argument "wait" of intrinsic "execute_command_line" is not present, it's treated as ".false." #77984

@psteinfeld

Description

@psteinfeld

Here's a program that shows the problem:

program bug
  call inner("echo hello")
contains
  subroutine inner(cmd, wait, exitstatarg, cmdstatarg, cmdmsgarg)
    character(10) :: cmd
    logical, optional :: wait
    integer, optional :: exitstatarg, cmdstatarg
    character(128), optional :: cmdmsgarg
    integer :: localvar
    call execute_command_line(cmd, wait, exitstatarg, localvar, cmdmsgarg)
  end subroutine
end

@yi-wu-arm, please take note.
When I compile and executes this program, it behaves as if the wait argument has the value .false.. It's supposed to act as if the value is .true..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions