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

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Wed Jun 24 13:47:20 PDT 2026


================
@@ -2986,6 +2986,7 @@ struct ModuleSubprogram {
   std::variant<common::Indirection<FunctionSubprogram>,
       common::Indirection<SubroutineSubprogram>,
       common::Indirection<SeparateModuleSubprogram>,
+      common::Indirection<OpenACCDeclarativeConstruct>,
----------------
eugeneepshteyn wrote:

So this is more general than ROUTINE, not just OpenACCRoutineConstruct? What happens with this file:
```
module m
  integer :: x
contains
!$acc declare copyin(x)
subroutine s()
end subroutine
end module
```
(Please add it as a test to catch any regressions.)

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


More information about the flang-commits mailing list