https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89751
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
This was fixed by the patch for PR121948.
Thanks for the report, Arseny.
Janus located the right area for the fix but it required that c2->tb be
allocated and the contents copied.
This runs and doesn't leak memory:
! { dg-do run )
integer function ul()
ul = 42
end function ul
program vw
interface
integer function ul ()
end function ul
end interface
type :: q8 (s4)
integer, kind :: s4 = 4
procedure (ul), nopass, pointer :: pj
end type q8
type (q8) :: ki
ki%pj => ul
if (ki%pj() /= 42) stop 1
ki%pj => ul2
if (ki%pj() /= -42) stop 2
contains
integer function ul2 ()
ul2 = -42
end function ul2
end program vw
Paul