Index: flang/runtime/environment.h =================================================================== --- flang/runtime/environment.h +++ flang/runtime/environment.h @@ -9,6 +9,8 @@ #ifndef FORTRAN_RUNTIME_ENVIRONMENT_H_ #define FORTRAN_RUNTIME_ENVIRONMENT_H_ +#include "cpp-type.h" +#include "entry-names.h" #include "flang/Decimal/decimal.h" #include @@ -38,6 +40,14 @@ Convert conversion; }; extern ExecutionEnvironment executionEnvironment; + +extern "C" { +// 16.9.51 COMMAND_ARGUMENT_COUNT +// +// Lowering may need to cast the result to match the precision of the default +// integer kind. +CppTypeFor RTNAME(ArgumentCount)(); +} } // namespace Fortran::runtime #endif // FORTRAN_RUNTIME_ENVIRONMENT_H_