[flang-commits] [flang] [flang][openacc] Ignore bare acc routine in module subprogram part instead of erroring out (PR #205450)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Wed Jun 24 08:49:09 PDT 2026


================
@@ -88,6 +88,26 @@ static constexpr auto globalOpenACCCompilerDirective{
     construct<ProgramUnit>(indirect(skipStuffBeforeStatement >>
         "!$ACC "_sptok >> Parser<OpenACCRoutineConstruct>{} / endOfLine))};
 
+struct WarnUnnamedOpenACCRoutineDirective {
+  using resultType = Success;
+  std::optional<Success> Parse(ParseState &state) const {
----------------
clementval wrote:

I can piggy back on that. In the reference compiler, the test added here doesn't raise an error but I think it is fine to keep the behavior we have now since the semantic of this directive in the wild is unknown, the user should do smth about it. 

https://github.com/llvm/llvm-project/pull/205450


More information about the flang-commits mailing list