Closed
Description
Reproducer:
modules.f90 :
module mod0
interface proc
module procedure proc
end interface
contains
subroutine proc(n)
print *, n
end subroutine
end module
module mod1
use mod0,renamed_proc=>proc
procedure(renamed_proc),pointer :: p
end module
main.f90 :
use mod1
p => renamed_proc
call p(343)
end program
flang-new -c modules.f90
flang-new -c main.f90
Bogus error:
error: Semantic errors in main.f90
./main.f90:2:3: error: 'proc' is not a procedure
p => renamed_proc
^^^^^^^^^^^^^^^^^
./main.f90:2:3: error: In assignment to object pointer 'p', the target 'proc' is a procedure designator
p => renamed_proc
^^^^^^^^^^^^^^^^^
./mod1.mod:5:26: Declaration of 'p'
procedure(proc),pointer::p
^
./main.f90:3:3: error: 'proc' is not a procedure
call p(343)
^^^^^^^^^^^
./mod1.mod:5:11: error: 'proc' must be an abstract interface or a procedure with an explicit interface
procedure(proc),pointer::p
This test is derived from discussions in #81544 and was not fixed by #82837.