From 642288247d0eb59069797f15cdd0f51b41d558c6 Mon Sep 17 00:00:00 2001 From: Eugene Epshteyn <59377284+eugeneepshteyn@users.noreply.github.com> Date: Tue, 4 Feb 2025 20:50:01 -0500 Subject: [flang] Add support for -fimplicit-none-ext option (#125248) When -fimplicit-none-ext is passed, flang behaves as if "implicit none(external)" was specified for all relevant constructs in Fortran source file. Note: implicit17.f90 was based on implicit07.f90 with `implicit none(external)` removed and `-fimplicit-none-ext` added. --- flang/lib/Frontend/CompilerInvocation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'flang/lib/Frontend/CompilerInvocation.cpp') diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 68b5950..a2c1d3e 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -740,6 +740,12 @@ static bool parseFrontendArgs(FrontendOptions &opts, llvm::opt::ArgList &args, args.hasFlag(clang::driver::options::OPT_fimplicit_none, clang::driver::options::OPT_fno_implicit_none, false)); + // -f{no-}implicit-none-ext + opts.features.Enable( + Fortran::common::LanguageFeature::ImplicitNoneExternal, + args.hasFlag(clang::driver::options::OPT_fimplicit_none_ext, + clang::driver::options::OPT_fno_implicit_none_ext, false)); + // -f{no-}backslash opts.features.Enable(Fortran::common::LanguageFeature::BackslashEscapes, args.hasFlag(clang::driver::options::OPT_fbackslash, -- cgit v1.1