Peter Klausler a54e8b2cc4
[flang] Silence bogus error about insufficiently defined interfaces (#116694)
The interfaces of separate module procedures are sufficiently well
defined in a submodule to be used in a local generic interface; the
compiler just needed to work a little harder to find them.

Fixes https://github.com/llvm/llvm-project/issues/116567.
2024-11-19 16:20:23 -08:00

43 lines
730 B
Fortran

!RUN: %flang -fsyntax-only %s 2>&1 | FileCheck --allow-empty %s
!Ensure no bogus error messages about insufficiently defined procedures
!CHECK-NOT: error
module m
interface
module subroutine smp1(a1)
end
end interface
end
submodule(m) sm1
interface
module subroutine smp2(a1,a2)
end
end interface
end
submodule(m:sm1) sm2
interface generic
procedure smp1
procedure smp2
module subroutine smp3(a1,a2,a3)
end
end interface
contains
subroutine local1
call generic(0.)
call generic(0., 1.)
call generic(0., 1., 2.)
end
subroutine local2(a1,a2,a3)
end
module procedure smp1
end
module subroutine smp2(a1,a2)
end
module subroutine smp3(a1,a2,a3)
end
end