[flang] Support lowering of intrinsic GET_COMMAND
authorPeixin Qiao <qiaopeixin@huawei.com>
Sat, 19 Nov 2022 11:26:17 +0000 (19:26 +0800)
committerPeixin Qiao <qiaopeixin@huawei.com>
Sat, 19 Nov 2022 11:26:17 +0000 (19:26 +0800)
commit6ed85a62bdbc40a7d98205b2b3da1cb46120faf4
treeb4d915e79df2d74343619433a0dec10d4355c581
parente37f8e588cd8a1d89f6cfbb829b8c9b6d8014b0f
[flang] Support lowering of intrinsic GET_COMMAND

As Fortran 2018 16.9.82, all the arguments of GET_COMMAND are optional.
When they are all absent, do nothing so to be consistent with gfortran
and ifort. The semantic analysis and runtime have been supported.

This intrinsic was introduced from F2003, and this supports the lowering
of it.

Reviewed By: PeteSteinfeld, jeanPerier

Differential Revision: https://reviews.llvm.org/D137887
flang/include/flang/Optimizer/Builder/Runtime/Command.h
flang/lib/Lower/IntrinsicCall.cpp
flang/lib/Optimizer/Builder/Runtime/Command.cpp
flang/test/Lower/Intrinsics/get_command.f90 [new file with mode: 0644]