llvm-project/flang/test/Semantics/procinterface03.f90
Peter Klausler 635656f4ff [flang] Expunge needless semantics::ProcInterface
The ProcInterface structure is used only by ProcEntityDetails; it represents
what a program might have put in parentheses in a procedure-declaration-stmt,
either the name of a procedure interface or a declaration-type-spec.

If a procedure entity has an implicit interface, the function result
type (if any) can be kept in EntityDetails::type_, which already exists
and is currently redundant for ProcEntityDetails symbols.

All that is really needed is a nullable Symbol pointer in ProcEntityDetails
to point to the procedure's explicit interface, when it has one.

Also, catch the case where a procedure has an explicit interface
and a program attempts to also give it a type.

Differential Revision: https://reviews.llvm.org/D140134
2022-12-16 10:44:29 -08:00

6 lines
160 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
procedure(sin), pointer :: pp
!ERROR: 'pp' has an explicit interface and may not also have a type
real :: pp
end