A generic-spec can appear on a module accessibility control statement even if it has not been declared as a generic interface, because there's nothing else that it could be. While here, simplify the parse tree and parser for AccessId, since one of its alternatives is ambiguous with the other. Differential Revision: https://reviews.llvm.org/D134471
22 lines
480 B
Fortran
22 lines
480 B
Fortran
! RUN: %python %S/test_modfile.py %s %flang_fc1
|
|
! Allow a generic spec that is not a name to be declared on an
|
|
! accessibility control statement
|
|
module m
|
|
public :: assignment(=)
|
|
public :: read(unformatted)
|
|
public :: operator(.eq.)
|
|
public :: operator(.smooth.)
|
|
end module
|
|
|
|
!Expect: m.mod
|
|
!module m
|
|
!interface assignment(=)
|
|
!end interface
|
|
!interface read(unformatted)
|
|
!end interface
|
|
!interface operator(.eq.)
|
|
!end interface
|
|
!interface operator(.smooth.)
|
|
!end interface
|
|
!end
|