[Flang] Missing error for MODULE prefix in abstract interface body
Open
accepts-invalid
flang:frontend
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Flang fails to diagnose an invalid `MODULE` prefix on a function declared inside an ABSTRACT INTERFACE block.
Expected behavior: The code should be rejected at compile time. Per the Fortran standard, MODULE may appear only in the function or subroutine of a module subprogram, or of a nonabstract interface body declared in the scoping unit of a module or submodule.
Actual behavior: Flang compiles the program successfully with no diagnostic.
Reproducer:
```Fortran
Module mod_test
Abstract Interface
Pure Integer Module Function f1(i)
Integer, Intent(In) :: i
End Function
End Interface
End Module
```
Contributor guide
Assessment
This issue has not been assessed yet.