[flang-commits] [flang] [mlir] [mlir][OpenACC] Error on external calls without acc routine info (PR #223815)
Razvan Lupusoru via flang-commits
flang-commits at lists.llvm.org
Wed Sep 16 08:05:06 PDT 2026
================
@@ -154,28 +155,42 @@ class ACCImplicitRoutine
// regions, skip it
if (!callee)
return;
+ // Already a valid symbol for GPU regions (e.g. an existing routine or an
+ // LLVM intrinsic), skip it.
if (accSupport.isValidSymbolUse(callOp.getOperation(), calleeSymbolRef))
return;
+ // Without a definition in this compilation unit an implicit routine
+ // cannot be applied, so the call target needs explicit routine
+ // information.
+ if (callee.isExternal()) {
+ callOp->emitError()
+ << "Procedures called in a compute region must have acc routine "
----------------
razvanlupusoru wrote:
nit: Avoid word "procedure" since it is Fortran specific. I would say: "Calls in an acc compute region must be marked with acc routine"
https://github.com/llvm/llvm-project/pull/223815
More information about the flang-commits
mailing list