https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106948
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-09-15
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.
Likely a problem due to use of submodules. A simplified, but otherwise
equivalent version, such as below, works:
module a
implicit none
interface new
module procedure :: b
end interface new
contains
subroutine b(x, f)
integer, intent(inout) :: x
interface
pure function f(x) result(r)
real, intent(in) :: x
real :: r
end function f
end interface
x = int(f(real(x)) * 0.1)
end subroutine b
end module a