From acdbb00af5d0b6469fceb8abb26634de2dbee985 Mon Sep 17 00:00:00 2001 From: Jean-Didier PAILLEUX Date: Sat, 16 Aug 2025 01:04:49 +0200 Subject: [flang] Adding support of -fcoarray flang and init PRIF (#151675) In relation to the approval and merge of the [PRIF](https://github.com/llvm/llvm-project/pull/76088) specification about multi-image features in Flang, here is a first PR to add support for the `-fcoarray` compilation flag and the initialization of the PRIF environment. Other PRs will follow for adding support of lowering to PRIF. --- flang/lib/Frontend/CompilerInvocation.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'flang/lib/Frontend/CompilerInvocation.cpp') diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 3811a87..265ba8e 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -1152,6 +1152,17 @@ static bool parseDialectArgs(CompilerInvocation &res, llvm::opt::ArgList &args, diags.Report(diagID); } } + // -fcoarray + if (args.hasArg(clang::driver::options::OPT_fcoarray)) { + res.getFrontendOpts().features.Enable( + Fortran::common::LanguageFeature::Coarray); + const unsigned diagID = + diags.getCustomDiagID(clang::DiagnosticsEngine::Warning, + "Support for multi image Fortran features is " + "still experimental and in development."); + diags.Report(diagID); + } + return diags.getNumErrors() == numErrorsBefore; } -- cgit v1.1