mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 03:36:37 +00:00

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.
18 lines
266 B
Fortran
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
|