mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 14:16:42 +00:00

When one of a derived type's FINAL procedures is in a submodule, its separate module procedure interface must necessarily be a forward reference from the FINAL statement, as its interface could not appear before the definition of the type. The implementation of FINAL procedure name resolution doesn't work for forward references; replace it. Differential Revision: https://reviews.llvm.org/D159035
20 lines
548 B
Fortran
20 lines
548 B
Fortran
! RUN: %python %S/test_symbols.py %s %flang_fc1
|
|
!DEF: /m Module
|
|
module m
|
|
!DEF: /m/t PUBLIC DerivedType
|
|
type :: t
|
|
contains
|
|
!DEF: /m/forwardreferenced ELEMENTAL, IMPURE, MODULE, PUBLIC (Subroutine) Subprogram
|
|
final :: forwardreferenced
|
|
end type
|
|
interface
|
|
!REF: /m/forwardreferenced
|
|
!DEF: /m/forwardreferenced/this INTENT(INOUT) ObjectEntity TYPE(t)
|
|
impure elemental module subroutine forwardreferenced (this)
|
|
!REF: /m/t
|
|
!REF: /m/forwardreferenced/this
|
|
type(t), intent(inout) :: this
|
|
end subroutine
|
|
end interface
|
|
end module
|