[flang-commits] [flang] [flang] Reject MODULE prefix in abstract interface body (PR #212980)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Fri Jul 31 06:28:19 PDT 2026


================
@@ -5630,6 +5630,11 @@ bool SubprogramVisitor::BeginSubprogram(const parser::Name &name,
     // other semantic checks run before we print the errors
     isValid = false;
   }
+  if (hasModulePrefix && inInterfaceBlock() && isAbstract()) { // C1547
+    Say(name,
+        "'%s' has MODULE prefix, which is not allowed in an ABSTRACT interface body"_err_en_US);
----------------
eugeneepshteyn wrote:

Consider `'%s' may not have a MODULE prefix in an ABSTRACT interface body` wording. It's more consistent with the other error messages.

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


More information about the flang-commits mailing list