Peter Klausler d418a03e01
[flang] Fix error from semantics on use associated procedure pointer (#107928)
Use associated procedure pointers were eliciting bogus errors from
semantics if their modules also contained generic procedure interfaces
of the same name. (The compiler handles this case correctly when the
specific procedure of the same name is not a pointer.)

With this fix, the test case in
  https://github.com/llvm/llvm-project/issues/107784
no longer experiences semantic errors; however, it now crashes
unexpectedly in lowering.
2024-09-10 14:15:20 -07:00

18 lines
266 B
Fortran

! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
module m
procedure(func), pointer :: foo
interface foo
procedure :: foo
end interface
contains
function func(x)
func = x
end
end
program main
use m
!CHECK: foo => func
foo => func
end